Skip to content

Commit 1aaca8d

Browse files
committed
Add tests for identified cases
1 parent a8823d1 commit 1aaca8d

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
@@ -896,6 +896,33 @@ describe('paredit', () => {
896896
await paredit.dragSexprBackward(a, ['b']);
897897
expect(textAndSelection(a)).toEqual(textAndSelection(b));
898898
});
899+
900+
describe('Ignore markers', () => {
901+
it('Drags past symbol', async () => {
902+
const a = docFromTextNotation('#_a (:b c)|');
903+
const b = docFromTextNotation('#_(:b c)| a');
904+
await paredit.dragSexprBackward(a);
905+
expect(textAndSelection(a)).toEqual(textAndSelection(b));
906+
});
907+
it('Drags past map', async () => {
908+
const a = docFromTextNotation('#_{:a b} (:c d)|');
909+
const b = docFromTextNotation('#_(:c d)| {:a b}');
910+
await paredit.dragSexprBackward(a);
911+
expect(textAndSelection(a)).toEqual(textAndSelection(b));
912+
});
913+
it('Drags past ignore after newline', async () => {
914+
const a = docFromTextNotation('(:a b)•#_{:c d}|');
915+
const b = docFromTextNotation('(:a b)•{:c d}|#_');
916+
await paredit.dragSexprBackward(a);
917+
expect(textAndSelection(a)).toEqual(textAndSelection(b));
918+
});
919+
it('Drags past ignore after space', async () => {
920+
const a = docFromTextNotation('(:a b) #_{:c d}|');
921+
const b = docFromTextNotation('(:a b) {:c d}|#_');
922+
await paredit.dragSexprBackward(a);
923+
expect(textAndSelection(a)).toEqual(textAndSelection(b));
924+
});
925+
});
899926
});
900927

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

0 commit comments

Comments
 (0)