Add test for custom header and content

This commit is contained in:
Matthias Beyer 2016-01-31 19:47:46 +01:00
parent 2b39b8eed7
commit e4d113cf4f

View file

@ -65,9 +65,35 @@ EOS
fi
}
invoke_tests \
test_call \
test_mkstore \
test_std_header \
test_std_header_plus_custom
test_std_header_plus_custom_and_content() {
local expected=$(cat <<EOS
---
[imag]
links = []
version = "0.1.0"
[zzz]
zzz = "z"
---
content
EOS
)
local name="test-std-header-plus-custom-and-content"
imag-store create -p /$name entry -h zzz.zzz=z -c content
local result=$(cat ${STORE}/$name)
if [[ "$expected" == "$result" ]]; then
out "Expected store entry == result"
else
err "${STORE}/test differs from expected"
return 1
fi
}
invoke_tests \
test_call \
test_mkstore \
test_std_header \
test_std_header_plus_custom \
test_std_header_plus_custom_and_content