freebsd-src/unit-tests/vardebug.exp
Simon J. Gerraty 1b65f0bd2b Import bmake-20201117
o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable
  checks in InitObjdir.  Explicit .OBJDIR target always allows
  read-only directory.

o Fix building and unit-tests on non-BSD.

o More code cleanup and refactoring.

o More unit tests
2020-11-20 03:54:37 +00:00

87 lines
4.3 KiB
Plaintext

Global:delete FROM_CMDLINE (not found)
Command:FROM_CMDLINE =
Global:.MAKEOVERRIDES = FROM_CMDLINE
Global:VAR = added
Global:VAR = overwritten
Global:delete VAR
Global:delete VAR (not found)
Var_Parse: ${:U} with VARE_WANTRES
Applying ${:U} to "" (VARE_WANTRES, none, VEF_UNDEF)
Result of ${:U} is "" (VARE_WANTRES, none, VEF_UNDEF|VEF_DEF)
Var_Set("${:U}", "empty name", ...) name expands to empty string - ignored
Var_Parse: ${:U} with VARE_WANTRES
Applying ${:U} to "" (VARE_WANTRES, none, VEF_UNDEF)
Result of ${:U} is "" (VARE_WANTRES, none, VEF_UNDEF|VEF_DEF)
Var_Append("${:U}", "empty name", ...) name expands to empty string - ignored
Global:FROM_CMDLINE = overwritten ignored!
Global:VAR = 1
Global:VAR = 1 2
Global:VAR = 1 2 3
Var_Parse: ${VAR:M[2]} with VARE_UNDEFERR|VARE_WANTRES
Applying ${VAR:M...} to "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, none)
Pattern[VAR] for [1 2 3] is [[2]]
ModifyWords: split "1 2 3" into 3 words
VarMatch [1] [[2]]
VarMatch [2] [[2]]
VarMatch [3] [[2]]
Result of ${VAR:M[2]} is "2" (VARE_UNDEFERR|VARE_WANTRES, none, none)
Var_Parse: ${VAR:N[2]} with VARE_UNDEFERR|VARE_WANTRES
Applying ${VAR:N...} to "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, none)
Pattern[VAR] for [1 2 3] is [[2]]
ModifyWords: split "1 2 3" into 3 words
Result of ${VAR:N[2]} is "1 3" (VARE_UNDEFERR|VARE_WANTRES, none, none)
Var_Parse: ${VAR:S,2,two,} with VARE_UNDEFERR|VARE_WANTRES
Applying ${VAR:S...} to "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, none)
Modifier part: "2"
Modifier part: "two"
ModifyWords: split "1 2 3" into 3 words
Result of ${VAR:S,2,two,} is "1 two 3" (VARE_UNDEFERR|VARE_WANTRES, none, none)
Var_Parse: ${VAR:Q} with VARE_UNDEFERR|VARE_WANTRES
Applying ${VAR:Q} to "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, none)
Result of ${VAR:Q} is "1\ 2\ 3" (VARE_UNDEFERR|VARE_WANTRES, none, none)
Var_Parse: ${VAR:tu:tl:Q} with VARE_UNDEFERR|VARE_WANTRES
Applying ${VAR:t...} to "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, none)
Result of ${VAR:tu} is "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, none)
Applying ${VAR:t...} to "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, none)
Result of ${VAR:tl} is "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, none)
Applying ${VAR:Q} to "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, none)
Result of ${VAR:Q} is "1\ 2\ 3" (VARE_UNDEFERR|VARE_WANTRES, none, none)
Var_Parse: ${:Uvalue:${:UM*e}:Mvalu[e]} with VARE_UNDEFERR|VARE_WANTRES
Applying ${:U...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, VEF_UNDEF)
Result of ${:Uvalue} is "value" (VARE_UNDEFERR|VARE_WANTRES, none, VEF_UNDEF|VEF_DEF)
Var_Parse: ${:UM*e}:Mvalu[e]} with VARE_UNDEFERR|VARE_WANTRES
Applying ${:U...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, VEF_UNDEF)
Result of ${:UM*e} is "M*e" (VARE_UNDEFERR|VARE_WANTRES, none, VEF_UNDEF|VEF_DEF)
Indirect modifier "M*e" from "${:UM*e}"
Applying ${:M...} to "value" (VARE_UNDEFERR|VARE_WANTRES, none, VEF_UNDEF|VEF_DEF)
Pattern[] for [value] is [*e]
ModifyWords: split "value" into 1 words
VarMatch [value] [*e]
Result of ${:M*e} is "value" (VARE_UNDEFERR|VARE_WANTRES, none, VEF_UNDEF|VEF_DEF)
Applying ${:M...} to "value" (VARE_UNDEFERR|VARE_WANTRES, none, VEF_UNDEF|VEF_DEF)
Pattern[] for [value] is [valu[e]]
ModifyWords: split "value" into 1 words
VarMatch [value] [valu[e]]
Result of ${:Mvalu[e]} is "value" (VARE_UNDEFERR|VARE_WANTRES, none, VEF_UNDEF|VEF_DEF)
Var_Parse: ${:UVAR} with VARE_WANTRES
Applying ${:U...} to "" (VARE_WANTRES, none, VEF_UNDEF)
Result of ${:UVAR} is "VAR" (VARE_WANTRES, none, VEF_UNDEF|VEF_DEF)
Global:delete VAR
Var_Parse: ${:Uvariable:unknown} with VARE_UNDEFERR|VARE_WANTRES
Applying ${:U...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, VEF_UNDEF)
Result of ${:Uvariable} is "variable" (VARE_UNDEFERR|VARE_WANTRES, none, VEF_UNDEF|VEF_DEF)
Applying ${:u...} to "variable" (VARE_UNDEFERR|VARE_WANTRES, none, VEF_UNDEF|VEF_DEF)
make: Unknown modifier 'u'
Result of ${:unknown} is error (VARE_UNDEFERR|VARE_WANTRES, none, VEF_UNDEF|VEF_DEF)
make: "vardebug.mk" line 44: Malformed conditional (${:Uvariable:unknown})
Var_Parse: ${UNDEFINED} with VARE_UNDEFERR|VARE_WANTRES
make: "vardebug.mk" line 53: Malformed conditional (${UNDEFINED})
Global:delete .SHELL (not found)
Command:.SHELL = </path/to/shell>
Command:.SHELL = overwritten ignored (read-only)
Global:.MAKEFLAGS = -r -k -d v -d
Global:.MAKEFLAGS = -r -k -d v -d 0
make: Fatal errors encountered -- cannot continue
make: stopped in unit-tests
exit status 1