Skip to content

Commit 7c8432b

Browse files
author
Reinhold Bertram
committed
adding tests on continuation operator
1 parent 390f6a1 commit 7c8432b

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

test_check.m

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,17 @@
112112
tokens = tokenize_code('[a,b],');
113113
assert(tokens(3).hasType('punctuation'))
114114
assert(tokens(6).hasType('linebreak'))
115+
116+
%% comments follow continuation operator
117+
tokens = tokenize_code('... % this is a comment');
118+
assert(tokens(1).hasType('punctuation'));
119+
assert(tokens(3).hasType('comment'));
120+
121+
tokens = tokenize_code('... this is a comment');
122+
assert(tokens(1).hasType('punctuation'));
123+
assert(tokens(2).hasType('space'));
124+
assert(tokens(3).hasType('comment'));
125+
126+
tokens = tokenize_code('....');
127+
assert(tokens(1).hasType('punctuation'));
128+
assert(tokens(2).hasType('comment'));

0 commit comments

Comments
 (0)