Skip to content

Commit

Permalink
Add tests for identified cases
Browse files Browse the repository at this point in the history
  • Loading branch information
PEZ committed Feb 11, 2024
1 parent a8823d1 commit 1aaca8d
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/extension-test/unit/cursor-doc/paredit-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,33 @@ describe('paredit', () => {
await paredit.dragSexprBackward(a, ['b']);
expect(textAndSelection(a)).toEqual(textAndSelection(b));
});

describe('Ignore markers', () => {
it('Drags past symbol', async () => {
const a = docFromTextNotation('#_a (:b c)|');
const b = docFromTextNotation('#_(:b c)| a');
await paredit.dragSexprBackward(a);
expect(textAndSelection(a)).toEqual(textAndSelection(b));
});
it('Drags past map', async () => {
const a = docFromTextNotation('#_{:a b} (:c d)|');
const b = docFromTextNotation('#_(:c d)| {:a b}');
await paredit.dragSexprBackward(a);
expect(textAndSelection(a)).toEqual(textAndSelection(b));
});
it('Drags past ignore after newline', async () => {
const a = docFromTextNotation('(:a b)•#_{:c d}|');
const b = docFromTextNotation('(:a b)•{:c d}|#_');
await paredit.dragSexprBackward(a);
expect(textAndSelection(a)).toEqual(textAndSelection(b));
});
it('Drags past ignore after space', async () => {
const a = docFromTextNotation('(:a b) #_{:c d}|');
const b = docFromTextNotation('(:a b) {:c d}|#_');
await paredit.dragSexprBackward(a);
expect(textAndSelection(a)).toEqual(textAndSelection(b));
});
});
});

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

0 comments on commit 1aaca8d

Please sign in to comment.