Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
laniakea64 committed Jun 14, 2024
1 parent bceae6d commit d2d55f2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/cases/expressions.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<span class="Character"> bar</span>
<span class="Character"> baz</span><span class="PreProc">}</span>
<span class="String">'''</span>
shell_expanded6 <span class="Operator">:=</span> <span class="String">x'</span><span class="Special">$$$$</span><span class="String">not_an_env_var </span><span class="Special">$$$$</span><span class="String">{also_not_an_env_var}'</span>

_true <span class="Operator">:=</span> <span class="Exception">assert</span>(<span class="String">'1'</span> <span class="Operator">!=</span> <span class="String">'0'</span>, <span class="String">'1 is not 0'</span>)

Expand Down
1 change: 1 addition & 0 deletions tests/cases/expressions.just
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ shell_expanded5 := x'''
bar
baz}
'''
shell_expanded6 := x'$$$$not_an_env_var $$$${also_not_an_env_var}'

_true := assert('1' != '0', '1 is not 0')

Expand Down
2 changes: 2 additions & 0 deletions tests/cases/replace_regex-captures.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
, <span class="Special">\</span>
)

foo11 <span class="Operator">:=</span> <span class="Function">replace_regex</span>(<span class="Constant">HEX</span>, <span class="String">'\d+'</span>, <span class="String">"</span><span class="Special">$$$$</span><span class="String">1"</span>)

not_a_replacement <span class="Operator">:=</span> <span class="String">'test $1 test '</span>
not_a_replacement_2 <span class="Operator">:=</span> <span class="String">"test $Abc_ test"</span>

Expand Down
2 changes: 2 additions & 0 deletions tests/cases/replace_regex-captures.just
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ foo10 := replace_regex("_abcdef",
, \
)

foo11 := replace_regex(HEX, '\d+', "$$$$1")

not_a_replacement := 'test $1 test '
not_a_replacement_2 := "test $Abc_ test"

Expand Down

0 comments on commit d2d55f2

Please sign in to comment.