mirror of
https://github.com/boostorg/build.git
synced 2026-02-09 23:12:23 +00:00
72 lines
1.9 KiB
Plaintext
72 lines
1.9 KiB
Plaintext
# Copyright 2001 Dave Abrahams
|
|
# 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)
|
|
|
|
#
|
|
# Jam code for testing the named-argument patch.
|
|
#
|
|
|
|
include recursive.jam ;
|
|
|
|
# Prefixes for all of the jam code we're going to test
|
|
local ECHO_ARGS = "include echo_args.jam ; echo_args "
|
|
;
|
|
|
|
local ECHO_VARARGS = "include echo_args.jam ; echo_varargs "
|
|
;
|
|
|
|
# Check that it will find missing arguments
|
|
Jam-fail $(ECHO_ARGS)";"
|
|
: "missing argument a"
|
|
;
|
|
|
|
# Check that it will find if too many arguments are passed
|
|
Jam-fail $(ECHO_ARGS)"1 2 : 3 : 4 : 5 ;"
|
|
: "extra argument 5"
|
|
;
|
|
|
|
# Check that it will find when an argument has too many elements
|
|
Jam-fail $(ECHO_ARGS)"a b c1 c2 : d ;"
|
|
: "extra argument c2"
|
|
;
|
|
|
|
# Check modifier '?'
|
|
Jam $(ECHO_ARGS)"1 2 3 : 4 ;"
|
|
: "a= 1 b= 2 c= 3 : d= 4 : e=" ;
|
|
Jam $(ECHO_ARGS)"1 2 : 3 ;"
|
|
: "a= 1 b= 2 c= : d= 3 : e=" ;
|
|
Jam $(ECHO_ARGS)"1 : 2 ;"
|
|
: "a= 1 b= c= : d= 2 : e=" ;
|
|
|
|
# Check modifier '+'
|
|
Jam-fail $(ECHO_ARGS)"1 ;"
|
|
: "missing argument d" ;
|
|
Jam $(ECHO_ARGS)"1 : 2 3 ;"
|
|
: "a= 1 b= c= : d= 2 3 : e=" ;
|
|
Jam $(ECHO_ARGS)"1 : 2 3 4 ;"
|
|
: "a= 1 b= c= : d= 2 3 4 : e=" ;
|
|
|
|
# Check modifier '*'
|
|
Jam $(ECHO_ARGS)"1 : 2 : 3 ;"
|
|
: "a= 1 b= c= : d= 2 : e= 3" ;
|
|
Jam $(ECHO_ARGS)"1 : 2 : 3 4 ;"
|
|
: "a= 1 b= c= : d= 2 : e= 3 4" ;
|
|
Jam $(ECHO_ARGS)"1 : 2 : 3 4 5 ;"
|
|
: "a= 1 b= c= : d= 2 : e= 3 4 5" ;
|
|
|
|
#
|
|
# Check varargs
|
|
#
|
|
Jam $(ECHO_VARARGS)"1 : 2 : 3 4 5 ;"
|
|
: "a= 1 b= c= : d= 2 : e= 3 4 5" ;
|
|
Jam $(ECHO_VARARGS)"1 : 2 : 3 4 5 : 6 ;"
|
|
: "a= 1 b= c= : d= 2 : e= 3 4 5 : rest= 6" ;
|
|
Jam $(ECHO_VARARGS)"1 : 2 : 3 4 5 : 6 7 ;"
|
|
: "a= 1 b= c= : d= 2 : e= 3 4 5 : rest= 6 7" ;
|
|
Jam $(ECHO_VARARGS)"1 : 2 : 3 4 5 : 6 7 : 8 ;"
|
|
: "a= 1 b= c= : d= 2 : e= 3 4 5 : rest= 6 7 : 8" ;
|
|
Jam $(ECHO_VARARGS)"1 : 2 : 3 4 5 : 6 7 : 8 : 9 ;"
|
|
: "a= 1 b= c= : d= 2 : e= 3 4 5 : rest= 6 7 : 8 : 9" ;
|
|
|
|
|