Skip to content

Commit cc2204f

Browse files
committed
heredoc: add some more tests
1 parent 3cb0a93 commit cc2204f

7 files changed

+16
-0
lines changed

js/vimlparser.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ function viml_has_key(obj, key) {
223223
function viml_stridx(a, b) {
224224
return a.indexOf(b);
225225
}
226+
226227
var NIL = [];
227228
var TRUE = 1;
228229
var FALSE = 0;

test/test_heredoc.ok

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@
99
(let =<< a (heredoc (list "trim") "EOS" (list " hello" " world"))))
1010
; we don't actually do the trimming for trim heredocs
1111
(let =<< a (heredoc (list "trim") "EOS" (list " hello" " world")))
12+
(let =<< a (heredoc (list "trim") "EOS" (list "\t hello" "\t\tworld")))

test/test_heredoc.vim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,8 @@ endif
2828
let a =<< trim EOS
2929
hello
3030
world
31+
EOS
32+
: let a =<< trim EOS
33+
hello
34+
world
3135
EOS
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
vimlparser: E990: Missing end marker 'EOF': line 5 col 0
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
:let a =<< trim EOF
2+
hello
3+
world
4+
EOF
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
vimlparser: E990: Missing end marker 'EOS': line 5 col 0
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
let a =<< EOS
2+
hello
3+
world
4+
EOS

0 commit comments

Comments
 (0)