summaryrefslogtreecommitdiff
path: root/tests/scripts/features/patspecific_vars
diff options
context:
space:
mode:
Diffstat (limited to 'tests/scripts/features/patspecific_vars')
-rw-r--r--tests/scripts/features/patspecific_vars14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/scripts/features/patspecific_vars b/tests/scripts/features/patspecific_vars
index 355e86d..8ca228d 100644
--- a/tests/scripts/features/patspecific_vars
+++ b/tests/scripts/features/patspecific_vars
@@ -131,4 +131,18 @@ ab: ; @echo "$(FOO)"
run_make_test(undef, 'FOO=C', "C f1\n");
+# TEST #9: Test shortest stem selection in pattern-specific variables.
+
+run_make_test('
+%-mt.x: x := two
+%.x: x := one
+
+all: foo.x foo-mt.x
+
+foo.x: ;@echo $x
+foo-mt.x: ;@echo $x
+',
+'',
+"one\ntwo");
+
1;