Skip to content

Commit a0de331

Browse files
committed
Add tests for drag-backwards past ignore
1 parent 2cdd557 commit a0de331

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/extension-test/unit/cursor-doc/paredit-test.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1464,6 +1464,33 @@ describe('paredit', () => {
14641464
await paredit.dragSexprBackward(a, ['b']);
14651465
expect(textAndSelection(a)).toEqual(textAndSelection(b));
14661466
});
1467+
1468+
describe('Ignore markers', () => {
1469+
it('Drags past symbol', async () => {
1470+
const a = docFromTextNotation('#_a (:b c)|');
1471+
const b = docFromTextNotation('#_(:b c)| a');
1472+
await paredit.dragSexprBackward(a);
1473+
expect(textAndSelection(a)).toEqual(textAndSelection(b));
1474+
});
1475+
it('Drags past map', async () => {
1476+
const a = docFromTextNotation('#_{:a b} (:c d)|');
1477+
const b = docFromTextNotation('#_(:c d)| {:a b}');
1478+
await paredit.dragSexprBackward(a);
1479+
expect(textAndSelection(a)).toEqual(textAndSelection(b));
1480+
});
1481+
it('Drags past ignore after newline', async () => {
1482+
const a = docFromTextNotation('(:a b)•#_{:c d}|');
1483+
const b = docFromTextNotation('(:a b)•{:c d}|#_');
1484+
await paredit.dragSexprBackward(a);
1485+
expect(textAndSelection(a)).toEqual(textAndSelection(b));
1486+
});
1487+
it('Drags past ignore after space', async () => {
1488+
const a = docFromTextNotation('(:a b) #_{:c d}|');
1489+
const b = docFromTextNotation('(:a b) {:c d}|#_');
1490+
await paredit.dragSexprBackward(a);
1491+
expect(textAndSelection(a)).toEqual(textAndSelection(b));
1492+
});
1493+
});
14671494
});
14681495

14691496
describe('backwardUp - one line', () => {

0 commit comments

Comments
 (0)