diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2016-01-31 21:25:47 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2016-02-09 13:48:14 +0100 |
commit | ee13a96fe648226c12d62182a8a6cab283b097f0 (patch) | |
tree | e1261dd4fe086c6181374aa997046a5bac17f419 /imag-store/tests/001-create_test.sh | |
parent | e4d113cf4f918eac4abd4e10abddbf65e99128e9 (diff) |
Add test with multiple headers on commandline
Diffstat (limited to 'imag-store/tests/001-create_test.sh')
-rw-r--r-- | imag-store/tests/001-create_test.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/imag-store/tests/001-create_test.sh b/imag-store/tests/001-create_test.sh index a944ad3a..71734b0d 100644 --- a/imag-store/tests/001-create_test.sh +++ b/imag-store/tests/001-create_test.sh @@ -65,6 +65,34 @@ EOS fi } +test_std_header_plus_custom_multiheader() { + local expected=$(cat <<EOS +--- +[foo] +bar = "baz" + +[imag] +links = [] +version = "0.1.0" + +[zzz] +zzz = "z" +--- + +EOS +) + + local filename="test-std-header-plus-custom-multiheader" + imag-store create -p /$filename entry -h zzz.zzz=z foo.bar=baz + local result=$(cat ${STORE}/$filename) + if [[ "$expected" == "$result" ]]; then + out "Expected store entry == result" + else + err "${STORE}/$filename differs from expected" + return 1 + fi +} + test_std_header_plus_custom_and_content() { local expected=$(cat <<EOS --- @@ -95,5 +123,6 @@ invoke_tests \ test_mkstore \ test_std_header \ test_std_header_plus_custom \ + test_std_header_plus_custom_multiheader \ test_std_header_plus_custom_and_content |