Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
laniakea64 committed Nov 21, 2024
1 parent 79fd5ce commit fbe69d1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/cases/recipes-with-extras.html
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,11 @@
<span class="SpecialComment">&Tab;#!/usr/bin/env python3</span>
<span class="Number">&Tab;import sys</span>
<span class="Number">&Tab;print(sys.argv)</span>

<span class="Function">styles</span><span class="Operator">:</span>
<span class="SpecialComment">&Tab;#!/bin/bash</span>
<span class="Number">&Tab;echo </span><span class="String">"</span><span class="Delimiter">{{</span><span class="Constant">GREEN</span><span class="Delimiter">}}</span><span class="String">Green</span><span class="Delimiter">{{</span><span class="Constant">NORMAL</span><span class="Delimiter">}}</span><span class="String">"</span>
<span class="Number">&Tab;echo </span><span class="String">'</span><span class="Delimiter">{{</span><span class="Constant">BLUE</span><span class="Delimiter">}}{{</span><span class="Constant">BOLD</span><span class="Delimiter">}}</span><span class="String">Bold Blue</span><span class="Delimiter">{{</span><span class="Constant">NORMAL</span><span class="Delimiter">}}</span><span class="String">'</span>
<span class="Number">&Tab;echo </span><span class="Delimiter">{{</span><span class="Constant">UNDERLINE</span><span class="Delimiter">}}{{</span><span class="Constant">MAGENTA</span><span class="Delimiter">}}</span><span class="Number">Magenta underlined text</span><span class="Delimiter">{{</span><span class="Constant">NORMAL</span><span class="Delimiter">}}</span>
<span class="Number">&Tab;echo </span><span class="String">"</span><span class="Delimiter">{{</span><span class="Function">style</span><span class="Normal">(</span><span class="String">'command'</span><span class="Normal">)</span><span class="Delimiter">}}</span><span class="String">echo command</span><span class="Delimiter">{{</span><span class="Constant">NORMAL</span><span class="Delimiter">}}</span><span class="String">"</span>
<span class="Number">&Tab;echo </span><span class="Delimiter">{{</span><span class="Function">quote</span><span class="Normal">(</span><span class="Function">style</span><span class="Normal">(</span><span class="String">'command'</span><span class="Normal">) </span><span class="Operator">+</span><span class="Normal"> </span><span class="String">'echo command'</span><span class="Normal"> </span><span class="Operator">+</span><span class="Normal"> </span><span class="Constant">NORMAL</span><span class="Normal">)</span><span class="Delimiter">}}</span><span class="Number"> &gt;&amp;2</span>
8 changes: 8 additions & 0 deletions tests/cases/recipes-with-extras.just
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,11 @@ ext:
#!/usr/bin/env python3
import sys
print(sys.argv)
styles:
#!/bin/bash
echo "{{GREEN}}Green{{NORMAL}}"
echo '{{BLUE}}{{BOLD}}Bold Blue{{NORMAL}}'
echo {{UNDERLINE}}{{MAGENTA}}Magenta underlined text{{NORMAL}}
echo "{{style('command')}}echo command{{NORMAL}}"
echo {{quote(style('command') + 'echo command' + NORMAL)}} >&2

0 comments on commit fbe69d1

Please sign in to comment.