Skip to content

Commit

Permalink
makesure_stable should not be changed before the release #60 : make t…
Browse files Browse the repository at this point in the history
…ests less rely on version number
  • Loading branch information
xonixx committed Sep 29, 2021
1 parent f73d9a8 commit 891009b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions Makesurefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@
F=makesure_candidate
{
echo '#!/bin/sh'
# We use `makesure_awk`, not `AWK` because otherwise it clashes with `AWK` set for tests
# The same we can't just use `A` because it can clash with external config variable that user might want to use
# Since in Posix sh there is no way to declare local var, let's just make names more specific
# We use `makesure_awk`, not `AWK` because otherwise it clashes with `AWK` set for tests.
# The same we can't just use `A` because it can clash with external config variable that user might want to use.
# Since in Posix sh there is no way to declare local var, let's just make names more specific.
echo "if command -v gawk >/dev/null;then makesure_awk='gawk -ltime -v Gawk=1';makesure_pre='';else makesure_awk=awk;makesure_pre='function gettimeofday(){}';fi"
echo 'exec $makesure_awk -v "Version='$NEXT_VERSION'" -v "Prog=$0" "$makesure_pre"'\'
awk -v Q=\' '
Expand Down
16 changes: 8 additions & 8 deletions tests/12_update.tush
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@ $ cd "$MYDIR"; ./$MAKESURE -f tests/12_update.sh test_err
@ wget/curl no found
? 1

$ cd "$MYDIR"; ./$MAKESURE -f tests/12_update.sh test_wget
$ cd "$MYDIR"; ./$MAKESURE -f tests/12_update.sh test_wget | awk '{ sub(/[0-9][0-9.]+/,"YYY") } 1'
| goal 'makesure_prepared' ...
| goal 'wget_prepared' ...
| goal 'test_wget' ...
| XXX
| running wget
| updated XXX -> 0.9.10
| updated XXX -> YYY
| running wget
| you have latest version 0.9.10 installed
| 0.9.10
| you have latest version YYY installed
| YYY

$ cd "$MYDIR"; ./$MAKESURE -f tests/12_update.sh test_curl
$ cd "$MYDIR"; ./$MAKESURE -f tests/12_update.sh test_curl | awk '{ sub(/[0-9][0-9.]+/,"YYY") } 1'
| goal 'makesure_prepared' ...
| goal 'curl_prepared' ...
| goal 'test_curl' ...
| XXX
| running curl
| updated XXX -> 0.9.10
| updated XXX -> YYY
| running curl
| you have latest version 0.9.10 installed
| 0.9.10
| you have latest version YYY installed
| YYY

0 comments on commit 891009b

Please sign in to comment.