Skip to content

Commit 3f0a498

Browse files
committed
Add tests for identified cases
1 parent 49981dc commit 3f0a498

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
@@ -872,6 +872,33 @@ describe('paredit', () => {
872872
await paredit.dragSexprBackward(a, ['b']);
873873
expect(textAndSelection(a)).toEqual(textAndSelection(b));
874874
});
875+
876+
describe('Ignore markers', () => {
877+
it('Drags past symbol', async () => {
878+
const a = docFromTextNotation('#_a (:b c)|');
879+
const b = docFromTextNotation('#_(:b c)| a');
880+
await paredit.dragSexprBackward(a);
881+
expect(textAndSelection(a)).toEqual(textAndSelection(b));
882+
});
883+
it('Drags past map', async () => {
884+
const a = docFromTextNotation('#_{:a b} (:c d)|');
885+
const b = docFromTextNotation('#_(:c d)| {:a b}');
886+
await paredit.dragSexprBackward(a);
887+
expect(textAndSelection(a)).toEqual(textAndSelection(b));
888+
});
889+
it('Drags past ignore after newline', async () => {
890+
const a = docFromTextNotation('(:a b)•#_{:c d}|');
891+
const b = docFromTextNotation('(:a b)•{:c d}|#_');
892+
await paredit.dragSexprBackward(a);
893+
expect(textAndSelection(a)).toEqual(textAndSelection(b));
894+
});
895+
it('Drags past ignore after space', async () => {
896+
const a = docFromTextNotation('(:a b) #_{:c d}|');
897+
const b = docFromTextNotation('(:a b) {:c d}|#_');
898+
await paredit.dragSexprBackward(a);
899+
expect(textAndSelection(a)).toEqual(textAndSelection(b));
900+
});
901+
});
875902
});
876903

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

0 commit comments

Comments
 (0)