Skip to content

Commit

Permalink
Add some line wrapping tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tgross35 committed Mar 3, 2024
1 parent 34d42c7 commit 57e2f07
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 14 deletions.
77 changes: 77 additions & 0 deletions test/corpus/multiline.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
================================================================================
trailing whitespace
================================================================================

a: #
--------------------------------------------------------------------------------

(source_file
(recipe
(recipe_header
(identifier))
(comment)))

================================================================================
smooshed recipes FIXME: should parse as two valid recipes
================================================================================

foo:
echo foo
bar:
echo bar

--------------------------------------------------------------------------------

(source_file
(recipe
(recipe_header
(identifier))
(recipe_body
(recipe_line
(text))
(recipe_line
(text))
(recipe_line
(text)))))

================================================================================
statement wrap FIXME: should parse as one valid statement
================================================================================

a := "foo" + \
"bar"

--------------------------------------------------------------------------------

(source_file
(assignment
(identifier)
(expression
(value
(string)))
(ERROR
(text))))

================================================================================
dependency wrap FIXME: should parse as valid dependencies
================================================================================

baz: foo \
bar
echo baz {{ a }}

--------------------------------------------------------------------------------

(source_file
(recipe
(recipe_header
(identifier)
(dependencies
(dependency
(identifier))))
(ERROR
(text)))
(ERROR
(identifier)
(identifier)
(text)))
14 changes: 0 additions & 14 deletions test/corpus/newlines.txt

This file was deleted.

12 changes: 12 additions & 0 deletions test/highlight/multiline.just
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# FIXME
a := "foo" + \
"bar"

foo:
echo foo {{ a }}
bar:
echo bar {{ a }}

baz: foo \
bar
echo baz {{ a }}

0 comments on commit 57e2f07

Please sign in to comment.