From e4f41c7319261b9585bd501256664679457e1d9d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 7 Aug 2018 14:59:07 +0200 Subject: Add support for default extension specification, trailing dot escaping For example: cxx{*}: extension = cxx cxx{foo} # foo.cxx cxx{foo.test} # foo.test (probably what we want...) cxx{foo.test...} # foo.test.cxx (... is this) cxx{foo..} # foo. cxx{foo....} # foo.. cxx{foo.....} # error (must come in escape pair) --- tests/name/extension.test | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 tests/name/extension.test (limited to 'tests') diff --git a/tests/name/extension.test b/tests/name/extension.test new file mode 100644 index 0000000..e97d0ab --- /dev/null +++ b/tests/name/extension.test @@ -0,0 +1,48 @@ +# file : tests/name/extension.test +# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +test.arguments = --match-only update + +.include ../common.test + ++cat <=build/root.build +define txt: file +txt{*}: extension = txt +EOI + +: unspecified +: +touch foo.txt; +$* <'./: txt{foo}' + +: specified +: +touch foo.text; +$* <'./: txt{foo.text}' + +: specified-none +: +touch foo; +$* <'./: txt{foo.}' + +: specified-default +: +touch foo.test.txt; +$* <'./: txt{foo.test...}' + +: specified-escape-one +: +touch foo.; +$* <'./: txt{foo..}' + +: specified-escape-two +: +touch foo..; +$* <'./: txt{foo....}' + +: specified-invalid +: +$* <'./: txt{foo.....}' 2>>EOE != 0 +:1:5: error: invalid trailing dot sequence in target name 'foo.....' +EOE -- cgit v1.1