2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-16 13:22:11 +00:00

Minor edits. Add var expansion test that veryfies that "$(x:D)" is broken.

[SVN r35351]
This commit is contained in:
Rene Rivera
2006-09-27 14:52:19 +00:00
parent 79047105e6
commit 08bebc57f8
3 changed files with 20 additions and 3 deletions

View File

@@ -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) ;

View File

@@ -6,4 +6,4 @@
BJAM=`ls -1 ../src/bin.*/bjam`
${BJAM} -f builtin_shell.jam
${BJAM} -f test.jam

View File

@@ -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 ;