From: Richard W.M. Jones Date: Sun, 12 Jan 2020 17:26:39 +0000 (+0000) Subject: tests: Consistency. X-Git-Tag: v'0.2'~39 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=28b9b0f04a42d61aa6c44246087b1985d1a8459f;p=goals.git tests: Consistency. Put the comment in the goalfile, and make sure the shell script is using set -e if appropriate. --- diff --git a/tests/00-empty-code.sh b/tests/00-empty-code.sh index d22ee4f..a0fc312 100755 --- a/tests/00-empty-code.sh +++ b/tests/00-empty-code.sh @@ -17,4 +17,6 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +set -e + goals -f 00-empty-code.gl diff --git a/tests/00-empty-goalfile.gl b/tests/00-empty-goalfile.gl index 1fc889e..7d345cb 100644 --- a/tests/00-empty-goalfile.gl +++ b/tests/00-empty-goalfile.gl @@ -16,4 +16,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# Test that goals works with an empty Goalfile (except for the +# mandatory "all" goal). + goal all diff --git a/tests/00-empty-goalfile.sh b/tests/00-empty-goalfile.sh index 71b560d..0152a16 100755 --- a/tests/00-empty-goalfile.sh +++ b/tests/00-empty-goalfile.sh @@ -17,7 +17,6 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# Test that goals works with an empty Goalfile (except for the -# mandatory "all" goal). +set -e goals -f 00-empty-goalfile.gl diff --git a/tests/00-insert-var.sh b/tests/00-insert-var.sh index e5b371d..9fe58a7 100755 --- a/tests/00-insert-var.sh +++ b/tests/00-insert-var.sh @@ -17,6 +17,8 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +set -e + goals -f 00-insert-var.gl > 00-insert-var.out test "$(cat 00-insert-var.out)" = "RIGHT" diff --git a/tests/00-order-linear.gl b/tests/00-order-linear.gl index fc72ab1..2745dd2 100644 --- a/tests/00-order-linear.gl +++ b/tests/00-order-linear.gl @@ -16,6 +16,8 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# Test a linear dependency graph is built in the right order. + goal all = : g1 goal g1 = : g2 { echo "G1" } goal g2 = : g3 { echo "G2" } diff --git a/tests/00-order-linear.sh b/tests/00-order-linear.sh index f2f7ec6..682ac8e 100755 --- a/tests/00-order-linear.sh +++ b/tests/00-order-linear.sh @@ -17,7 +17,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# Test a linear dependency graph is built in the right order. +set -e goals -f 00-order-linear.gl > 00-order-linear.out test "$(grep '^G' 00-order-linear.out)" = "G5 diff --git a/tests/00-override-goal.sh b/tests/00-override-goal.sh index b8e500f..67f1376 100755 --- a/tests/00-override-goal.sh +++ b/tests/00-override-goal.sh @@ -17,4 +17,6 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +set -e + goals -f 00-override-goal.gl diff --git a/tests/00-override-var.sh b/tests/00-override-var.sh index 8b5c47b..f637116 100755 --- a/tests/00-override-var.sh +++ b/tests/00-override-var.sh @@ -17,6 +17,8 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +set -e + goals -f 00-override-var.gl > 00-override-var.out test "$(cat 00-override-var.out)" = "RIGHT"