diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2016-01-31 21:49:36 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2016-02-09 13:48:14 +0100 |
commit | 3004845339f50d5f3a3e04f13e5040229bf53879 (patch) | |
tree | 7d73fe6611bd55791cc535a6f5cf2b69ec1b9666 /imag-store/tests | |
parent | ee13a96fe648226c12d62182a8a6cab283b097f0 (diff) |
Add test for file with custom header with two keys in one section
Diffstat (limited to 'imag-store/tests')
-rw-r--r-- | imag-store/tests/001-create_test.sh | 40 |
1 files changed, 34 insertions, 6 deletions
diff --git a/imag-store/tests/001-create_test.sh b/imag-store/tests/001-create_test.sh index 71734b0d..1b41ed01 100644 --- a/imag-store/tests/001-create_test.sh +++ b/imag-store/tests/001-create_test.sh @@ -93,6 +93,33 @@ EOS fi } + +test_std_header_plus_custom_multiheader_same_section() { + local expected=$(cat <<EOS +--- +[imag] +links = [] +version = "0.1.0" + +[zzz] +bar = "baz" +zzz = "z" +--- + +EOS +) + + local filename="test-std-header-plus-custom-mutliheader-same-section" + imag-store create -p /$filename entry -h zzz.zzz=z zzz.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 --- @@ -118,11 +145,12 @@ EOS fi } -invoke_tests \ - test_call \ - test_mkstore \ - test_std_header \ - test_std_header_plus_custom \ - test_std_header_plus_custom_multiheader \ +invoke_tests \ + test_call \ + test_mkstore \ + test_std_header \ + test_std_header_plus_custom \ + test_std_header_plus_custom_multiheader \ + test_std_header_plus_custom_multiheader_same_section \ test_std_header_plus_custom_and_content |