From 08bebc57f838fb5650d7217c5fb27fcacd11640c Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 27 Sep 2006 14:52:19 +0000 Subject: [PATCH] Minor edits. Add var expansion test that veryfies that "$(x:D)" is broken. [SVN r35351] --- historic/jam/test/test.jam | 5 +++-- historic/jam/test/test.sh | 2 +- historic/jam/test/var_expand.jam | 16 ++++++++++++++++ 3 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 historic/jam/test/var_expand.jam diff --git a/historic/jam/test/test.jam b/historic/jam/test/test.jam index b6d36b174..066862ce4 100644 --- a/historic/jam/test/test.jam +++ b/historic/jam/test/test.jam @@ -27,11 +27,11 @@ rule assert ( expected * : test ? : obtained * ) { test ?= "(==)" ; local r = 0 ; - if $(test) = "(==)" && $(expected) != $(obtained) + if $(test) = "(==)" && "*$(expected)*" != "*$(obtained)*" { fail '$(expected)' $(test) '$(obtained)' ; } - else if $(test) = "(!=)" && $(expected) = $(obtained) + else if $(test) = "(!=)" && "*$(expected)*" = "*$(obtained)*" { fail '$(expected)' $(test) '$(obtained)' ; } @@ -45,5 +45,6 @@ include builtin_shell.jam ; include builtin_w32_getregnames.jam ; include stress_var_expand.jam ; include target_var.jam ; +include var_expand.jam ; EXIT --- Complete: PASSED($(pass-count)) *FAILED($(fail-count))* : $(fail-count) ; diff --git a/historic/jam/test/test.sh b/historic/jam/test/test.sh index d9087100a..68872a389 100644 --- a/historic/jam/test/test.sh +++ b/historic/jam/test/test.sh @@ -6,4 +6,4 @@ BJAM=`ls -1 ../src/bin.*/bjam` -${BJAM} -f builtin_shell.jam +${BJAM} -f test.jam diff --git a/historic/jam/test/var_expand.jam b/historic/jam/test/var_expand.jam new file mode 100644 index 000000000..cacacf33d --- /dev/null +++ b/historic/jam/test/var_expand.jam @@ -0,0 +1,16 @@ +#~ Copyright 2006 Rene Rivera. +#~ Distributed under the Boost Software License, Version 1.0. +#~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +ECHO --- Testing var expansion... ; + +local p0 = name ; +local p1 = dir/name ; +local p2 = dir/sub/name ; + +assert $(p0:D=) : (==) : name ; +assert $(p1:D=) : (==) : name ; +assert $(p2:D=) : (==) : name ; +assert $(p0:D) : (==) : ; +assert $(p1:D) : (==) : dir ; +assert $(p2:D) : (==) : dir/sub ;