From 2d8ebb010abf21c2b1f5ecc070dbbcc2bc61335f Mon Sep 17 00:00:00 2001 From: xonix Date: Wed, 3 Jan 2024 19:29:11 +0200 Subject: [PATCH] Allow @glob goals to be parameterized #155 : add tests --- tests/29_glob_plus_pg.sh | 16 ++++++++++++++++ tests/29_glob_plus_pg.tush | 8 ++++++++ tests/glob_test/1.txt | 1 + tests/glob_test/2.txt | 1 + 4 files changed, 26 insertions(+) create mode 100644 tests/29_glob_plus_pg.sh create mode 100644 tests/29_glob_plus_pg.tush create mode 100644 tests/glob_test/1.txt create mode 100644 tests/glob_test/2.txt diff --git a/tests/29_glob_plus_pg.sh b/tests/29_glob_plus_pg.sh new file mode 100644 index 0000000..2b2abdf --- /dev/null +++ b/tests/29_glob_plus_pg.sh @@ -0,0 +1,16 @@ + +@goal gpg @glob 'glob_test/*.txt' @params P + echo "$ITEM $P" + +@goal g1 +@depends_on gpg @args 'hello' + +@goal g2 +@depends_on gpg @args 'hello' +@depends_on gpg @args 'hi' + +@goal g3 +@depends_on g3pg @args 'salut' + +@goal g3pg @params X +@depends_on gpg @args X diff --git a/tests/29_glob_plus_pg.tush b/tests/29_glob_plus_pg.tush new file mode 100644 index 0000000..66e9026 --- /dev/null +++ b/tests/29_glob_plus_pg.tush @@ -0,0 +1,8 @@ + +$ cd "$MYDIR"; ./$MAKESURE -f tests/29_glob_plus_pg.sh -l + +$ cd "$MYDIR"; ./$MAKESURE -f tests/29_glob_plus_pg.sh g1 + +$ cd "$MYDIR"; ./$MAKESURE -f tests/29_glob_plus_pg.sh g2 + +$ cd "$MYDIR"; ./$MAKESURE -f tests/29_glob_plus_pg.sh g3 diff --git a/tests/glob_test/1.txt b/tests/glob_test/1.txt new file mode 100644 index 0000000..9d07aa0 --- /dev/null +++ b/tests/glob_test/1.txt @@ -0,0 +1 @@ +111 \ No newline at end of file diff --git a/tests/glob_test/2.txt b/tests/glob_test/2.txt new file mode 100644 index 0000000..6dd90d2 --- /dev/null +++ b/tests/glob_test/2.txt @@ -0,0 +1 @@ +222 \ No newline at end of file