diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2013-01-27 19:41:28 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2013-01-27 19:49:58 +0100 |
commit | 1e4a96730da70fcfa3b8c153874cbdebad0f9829 (patch) | |
tree | 9495f33f6b54621e0a684b553b64a6958744c1e3 /test/app-conf.bats | |
parent | e1daac32c5b7ca0d902c16135d361aa5303f5124 (diff) | |
download | app.sh-1e4a96730da70fcfa3b8c153874cbdebad0f9829.tar.gz app.sh-1e4a96730da70fcfa3b8c153874cbdebad0f9829.tar.bz2 app.sh-1e4a96730da70fcfa3b8c153874cbdebad0f9829.tar.xz app.sh-1e4a96730da70fcfa3b8c153874cbdebad0f9829.zip |
o Starting on a style guide.
app-conf: Adding 'import' command.
app-cat-conf: Adding support for multiple -f flags. The default files
can be switched off.
A file named "-" is the same as /dev/stdin.
app: Adding a way to enable debugging.
app-install-file: Import any configuration delivered with the package.
Diffstat (limited to 'test/app-conf.bats')
-rwxr-xr-x | test/app-conf.bats | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/test/app-conf.bats b/test/app-conf.bats index 08676d2..f85dbab 100755 --- a/test/app-conf.bats +++ b/test/app-conf.bats @@ -4,7 +4,8 @@ load utils setup_inner() { - mkdir .app; touch .app/config + mkdir .app; + echo > .app/config export APPSH_DEFAULT_CONFIG=/dev/null } @@ -116,4 +117,20 @@ setup_inner() { app conf list; echo_lines eq '$status' 0 eq '${lines[0]}' "foo.bar awesome " + eq '${#lines[*]}' 1 +} + +@test "./app conf import" { + echo "foo.bar=1" > .app/config + echo "foo.baz=1" > config-b + echo "foo.bar=2" >> config-b + + app conf import config-b; echo_lines + eq '$status' 0 + eq '${#lines[*]}' 0 + + app_libexec app-cat-conf + eq '${lines[0]}' "foo.bar=2" + eq '${lines[1]}' "foo.baz=1" + eq '${#lines[*]}' 2 } |