test_shellvars.aug

Summary
test_shellvars.aug
Shellvars.lnsSupport `##` bashism in conditions (GH issue #118)
Shellvars.lnsParse (almost) any command
Shellvars.lnsSupport pipes in commands
Shellvars.lnsSupport && and || after command GH #215
Unsupported syntaxThe following tests are known to be failing currently

Shellvars.lns

test Shellvars.lns get "if [ \"${APACHE_CONFDIR##/etc/apache2-}\" != \"${APACHE_CONFDIR}\" ] ; then SUFFIX=\"-${APACHE_CONFDIR##/etc/apache2-}\" else SUFFIX= fi\n" = { "@if" = "[ \"${APACHE_CONFDIR##/etc/apache2-}\" != \"${APACHE_CONFDIR}\" ]" { "SUFFIX" = "\"-${APACHE_CONFDIR##/etc/apache2-}\"" } { "@else" { "SUFFIX" = "" } } }

Support `##` bashism in conditions (GH issue #118)

Shellvars.lns

test Shellvars.lns get "echo foobar 'and this is baz' /usr/local/bin/myscript-with-dash_and_underscore.sh with args echo foo \ bar\n" = { "@command" = "echo" { "@arg" = "foobar 'and this is baz'" } } { "@command" = "/usr/local/bin/myscript-with-dash_and_underscore.sh" { "@arg" = "with args" } } { "@command" = "echo" { "@arg" = "foo \\\nbar" } }

Parse (almost) any command

Shellvars.lns

test Shellvars.lns get "echo \"$STRING\" | grep foo\n" = { "@command" = "echo" { "@arg" = "\"$STRING\"" } { "@pipe" { "@command" = "grep" { "@arg" = "foo" } } } }

Support pipes in commands

Shellvars.lns

test Shellvars.lns get "grep -q \"Debian\" /etc/issue && echo moo\n" = { "@command" = "grep" { "@arg" = "-q \"Debian\" /etc/issue" } { "@and" { "@command" = "echo" { "@arg" = "moo" } } } }

Support && and || after command GH #215

Unsupported syntax

The following tests are known to be failing currently

test Shellvars.lns get "if [ \"${APACHE_CONFDIR##/etc/apache2-}\" != \"${APACHE_CONFDIR}\" ] ; then SUFFIX=\"-${APACHE_CONFDIR##/etc/apache2-}\" else SUFFIX= fi\n" = { "@if" = "[ \"${APACHE_CONFDIR##/etc/apache2-}\" != \"${APACHE_CONFDIR}\" ]" { "SUFFIX" = "\"-${APACHE_CONFDIR##/etc/apache2-}\"" } { "@else" { "SUFFIX" = "" } } }
Support `##` bashism in conditions (GH issue #118)
Close