1
0
Fork 0
mirror of synced 2024-12-21 22:21:08 -05:00

Switch to semantic versioning

This commit is contained in:
Tim Byrne 2017-05-10 07:55:45 -05:00
parent 9d21376f88
commit 79e149ed25
No known key found for this signature in database
GPG key ID: 14DB4FC2465A4B12

View file

@ -5,7 +5,7 @@ status=;output=; #; populated by bats run()
@test "Command 'version'" {
echo "
When 'version' command is provided,
Print the current version with format 'yadm x.xx'
Print the current version with format 'yadm x.x.x'
Exit with 0
"
@ -20,6 +20,6 @@ status=;output=; #; populated by bats run()
#; validate status and output
[ $status -eq 0 ]
[ "$output" = "yadm $VERSION" ]
version_regex="^yadm [[:digit:]\.]+$"
version_regex="^yadm [[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+$"
[[ "$output" =~ $version_regex ]]
}