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 Apr 24, 2023
1 parent 49981dc commit 3f0a498
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 @@ -872,6 +872,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 3f0a498

Please sign in to comment.