1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-01 08:27:59 +00:00
freebsd/unit-tests/cond-token-plain.exp
Simon J. Gerraty 2935fe8237 Import bmake-20211212
Relevant changes see ChangeLog for details:

Add support for ${.SUFFIXES} as read-only variable.

Fix memory leak in cond.c

Punt on write errors - ENOSPC etc.

Lots of code refactoring, rework to reduce memory allocations.

More unit-tests.
2021-12-17 23:27:22 -08:00

62 lines
2.7 KiB
Plaintext

CondParser_Eval: ${:Uvalue} != value
lhs = "value", rhs = "value", op = !=
CondParser_Eval: ${:U} != "
lhs = "", rhs = "", op = !=
CondParser_Eval: ${:U#hash} != "#hash"
lhs = "#hash", rhs = "#hash", op = !=
CondParser_Eval: ${:U\\} != "\\
lhs = "\", rhs = "\", op = !=
CondParser_Eval: ${:U#hash} != #hash
lhs = "#hash", rhs = "#hash", op = !=
CondParser_Eval: 0 # This is treated as a comment, but why?
CondParser_Eval: ${0 # comment :?yes:no} != no
CondParser_Eval: 0 # comment
lhs = "no", rhs = "no", op = !=
CondParser_Eval: ${1 # comment :?yes:no} != yes
CondParser_Eval: 1 # comment
lhs = "yes", rhs = "yes", op = !=
CondParser_Eval: ${UNDEF:Uundefined}!=undefined
lhs = "undefined", rhs = "undefined", op = !=
CondParser_Eval: ${UNDEF:U12345}>12345
lhs = 12345.000000, rhs = 12345.000000, op = >
CondParser_Eval: ${UNDEF:U12345}<12345
lhs = 12345.000000, rhs = 12345.000000, op = <
CondParser_Eval: (${UNDEF:U0})||0
CondParser_Eval: ${:Uvar}&&name != "var&&name"
lhs = "var&&name", rhs = "var&&name", op = !=
CondParser_Eval: ${:Uvar}||name != "var||name"
lhs = "var||name", rhs = "var||name", op = !=
CondParser_Eval: bare
make: "cond-token-plain.mk" line 106: A bare word is treated like defined(...), and the variable 'bare' is not defined.
CondParser_Eval: VAR
make: "cond-token-plain.mk" line 111: A bare word is treated like defined(...).
CondParser_Eval: V${:UA}R
make: "cond-token-plain.mk" line 118: ok
CondParser_Eval: V${UNDEF}AR
make: "cond-token-plain.mk" line 126: Undefined variables in bare words expand to an empty string.
CondParser_Eval: 0${:Ux00}
make: "cond-token-plain.mk" line 134: Numbers can be composed from literals and variable expressions.
CondParser_Eval: 0${:Ux01}
make: "cond-token-plain.mk" line 138: Numbers can be composed from literals and variable expressions.
CondParser_Eval: "" ==
make: "cond-token-plain.mk" line 144: Missing right-hand side of operator '=='
CondParser_Eval: == ""
make: "cond-token-plain.mk" line 152: Malformed conditional (== "")
CondParser_Eval: \\
make: "cond-token-plain.mk" line 167: The variable '\\' is not defined.
CondParser_Eval: \\
make: "cond-token-plain.mk" line 172: Now the variable '\\' is defined.
CondParser_Eval: "unquoted\"quoted" != unquoted"quoted
lhs = "unquoted"quoted", rhs = "unquoted"quoted", op = !=
CondParser_Eval: $$$$$$$$ != ""
CondParser_Eval: left == right
make: "cond-token-plain.mk" line 195: Malformed conditional (left == right)
CondParser_Eval: ${0:?:} || left == right
CondParser_Eval: 0
make: "cond-token-plain.mk" line 201: Malformed conditional (${0:?:} || left == right)
CondParser_Eval: left == right || ${0:?:}
make: "cond-token-plain.mk" line 206: Malformed conditional (left == right || ${0:?:})
make: Fatal errors encountered -- cannot continue
make: stopped in unit-tests
exit status 1