Add test for custom header and content
This commit is contained in:
parent
2b39b8eed7
commit
e4d113cf4f
1 changed files with 31 additions and 5 deletions
|
@ -65,9 +65,35 @@ EOS
|
|||
fi
|
||||
}
|
||||
|
||||
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 \
|
||||
test_std_header_plus_custom_and_content
|
||||
|
||||
|
|
Loading…
Reference in a new issue