Fix wildcard matching for modelines
ClosedPublic

Authored by dhaumann on Dec 30 2017, 8:21 PM.

Details

Summary

This patch adds a unit test for reading kate modelines.
In particular, the unit test ensures that the following examples work correctly:

  1. kate: variable value;
  2. kate-wildcard(*.txt): variable value;
  3. kate-wildchard(*.foo;*.txt;*.bar): variable value;
  4. kate-modeline(text/plain): variable value;
  5. kate-modeline(text/foo;text/plain;text/bar): variable value;

The unit test found that 3. did not work correctly due to a wrong
bool assignment. This is now fixed.

Test Plan

make test

Diff Detail

Repository
R39 KTextEditor
Branch
TestModelines (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
dhaumann created this revision.Dec 30 2017, 8:21 PM
Restricted Application added projects: Kate, Frameworks. · View Herald TranscriptDec 30 2017, 8:21 PM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
dhaumann requested review of this revision.Dec 30 2017, 8:21 PM
brauch accepted this revision.Dec 30 2017, 8:31 PM
brauch added a subscriber: brauch.

Heh. Fix looks obviously correct to me (good find), and tests are always nice.

This revision is now accepted and ready to land.Dec 30 2017, 8:31 PM
This revision was automatically updated to reflect the committed changes.