Skip to content

Commit 32c3921

Browse files
committed
test: - Check 'include' lines work when split with line continuation
1 parent f17c1cd commit 32c3921

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/Scripting/Includes.test.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,25 @@ describe('include tests', () => {
6464
const source = 'include not_done';
6565
const query = createValidQuery(source, includes);
6666
expectFiltersToBe(query, ['not done']);
67+
expect(query.explainQuery()).toMatchInlineSnapshot(`
68+
"include not_done =>
69+
not done
70+
"
71+
`);
72+
});
73+
74+
it('should accept whole-line include filter instruction, continued over two lines', () => {
75+
const source = 'include \\\nnot_done';
76+
const query = createValidQuery(source, includes);
77+
expectFiltersToBe(query, ['not done']);
78+
expect(query.explainQuery()).toMatchInlineSnapshot(`
79+
"include \\
80+
not_done
81+
=>
82+
include not_done =>
83+
not done
84+
"
85+
`);
6786
});
6887
});
6988

0 commit comments

Comments
 (0)