Skip to content

Commit 0b7c8d4

Browse files
committed
add more textNotation tests
1 parent f433d3d commit 0b7c8d4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/extension-test/unit/common/text-notation-test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ describe('text-notation test utils', () => {
88
const doc = textNotation.docFromTextNotation(inputText);
99
expect(textNotation.textNotationFromDoc(doc)).toEqual(inputText);
1010
});
11+
it('returns the normalized version of the input text to textNotationFromDoc', () => {
12+
const inputText = '<0e<0 f >1g>1';
13+
const normalized = '<e< f |1g|1';
14+
const doc = textNotation.docFromTextNotation(inputText);
15+
expect(textNotation.textNotationFromDoc(doc)).toEqual(normalized);
16+
17+
const inputText1 = '|3a|3 <1b<1 >2c>2 d•>0e>0 f |4g<5<5';
18+
const normalized1 = '|3a|3 <1b<1 |2c|2 d•|e| f |4g|5';
19+
const doc1 = textNotation.docFromTextNotation(inputText1);
20+
expect(textNotation.textNotationFromDoc(doc1)).toEqual(normalized1);
21+
});
1122
it('has cursor at end when no trailing newline', () => {
1223
const inputText = '()|';
1324
const doc = textNotation.docFromTextNotation(inputText);

0 commit comments

Comments
 (0)