Skip to content

Commit

Permalink
Add test cases from #14
Browse files Browse the repository at this point in the history
  • Loading branch information
DrJosh9000 committed Sep 17, 2024
1 parent f208552 commit ce08221
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions interpolate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,8 @@ func TestEscapingVariables(t *testing.T) {
{`Do this \${SUCH_ESCAPE}`, `Do this ${SUCH_ESCAPE}`},
{`Do this $${SUCH_ESCAPE:-$OTHERWISE}`, `Do this ${SUCH_ESCAPE:-$OTHERWISE}`},
{`Do this \${SUCH_ESCAPE:-$OTHERWISE}`, `Do this ${SUCH_ESCAPE:-$OTHERWISE}`},
{`Do this $${SUCH_ESCAPE:-$$OTHERWISE}`, `Do this ${SUCH_ESCAPE:-$OTHERWISE}`},
{`Do this \${SUCH_ESCAPE:-\$OTHERWISE}`, `Do this ${SUCH_ESCAPE:-$OTHERWISE}`},
{`echo "my favourite mountain is cotopaxi" | grep 'xi$$'`, `echo "my favourite mountain is cotopaxi" | grep 'xi$'`},
} {
result, err := interpolate.Interpolate(nil, tc.Str)
Expand Down

0 comments on commit ce08221

Please sign in to comment.