From 9d860f46631c1567c62336fcb25cf7b8090855a4 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 6 Dec 2021 11:16:22 +0200 Subject: Recognize absolute Windows paths in make parser --- libbuild2/make-parser.test.testscript | 39 +++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) (limited to 'libbuild2/make-parser.test.testscript') diff --git a/libbuild2/make-parser.test.testscript b/libbuild2/make-parser.test.testscript index 6db00eb..9108ba3 100644 --- a/libbuild2/make-parser.test.testscript +++ b/libbuild2/make-parser.test.testscript @@ -1,6 +1,8 @@ # file : libbuild2/make-parser.test.testscript # license : MIT; see accompanying LICENSE file +windows = ($cxx.target.class == 'windows') + : valid : $* <>EOO @@ -88,11 +90,40 @@ $* <>EOO P bar EOO -: lax +: escape : $* <>EOO - foo: c:\tmp\bar + \#foo\:\ bar: fox$$\\baz EOI - T foo - P c:\tmp\bar + T #foo: bar + P fox$\baz EOO + +: windows +: +if $windows +{ + $* <>EOO + foo: c:\tmp\bar + + c:\tmp\foo: c:\tmp\bar \ + c:\tmp\baz + + c:\\tmp\\foo: c:\\tmp\\bar + + c:\x:c:\y + EOI + T foo + P c:\tmp\bar + + T c:\tmp\foo + P c:\tmp\bar + P c:\tmp\baz + + T c:\tmp\foo + P c:\tmp\bar + + T c:\x + P c:\y + EOO +} -- cgit v1.1