Skip to content

Commit 2973c6b

Browse files
committed
test: - '\' at end of last line in query discards that instruction
See #3137.
1 parent e1a8a1c commit 2973c6b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/Query/Query.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,13 @@ describe('Query parsing', () => {
556556
expect(new Query('short mode\nfull').queryLayoutOptions.shortMode).toEqual(false);
557557
});
558558

559+
it.failing('should cope with missing end-of-line character in query ending with continuation character', () => {
560+
// See https://github.com/obsidian-tasks-group/obsidian-tasks/issues/3137
561+
const query = new Query('path includes query.md \\');
562+
expect(query.filters.length).toEqual(1);
563+
expect(query.filters[0].instruction).toEqual('path includes query.md');
564+
});
565+
559566
describe('should include instruction in parsing error messages', () => {
560567
function getQueryError(source: string) {
561568
return new Query(source, new TasksFile('Example Path.md')).error;

0 commit comments

Comments
 (0)