History log of /netbsd-current/usr.bin/make/unit-tests/varmod-assign.mk
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: perseant-exfatfs-base-20240630
# 1.22 30-Jun-2024 rillig

make: error out on some more syntax errors

Previously, these errors only produced a message on stderr. They only
affected make's exit status when they were evaluated at parse time, but
not when evaluating the commands for a specific target right before
executing them.

The affected syntax errors are:
* invalid regular expressions in the ':C' modifier
* out-of-range references to regex groups in the ':C' modifier
* unfinished modifiers


# 1.21 30-Jun-2024 rillig

make: add detailed exit status to message for failed sub-commands

Several commands communicate via the exit status and not only
distinguish between zero and non-zero, so make this information
available to ease investigations.

The command "false" is not guaranteed to exit with a consistent status,
so use "(exit 13)" instead in the tests, to keep these tests portable
across different operating systems. The exit status 127 is required for
a shell that cannot find a command, so keep that one.


Revision tags: perseant-exfatfs-base
# 1.20 20-Apr-2024 rillig

branches: 1.20.2;
make: provide more context information for parse/evaluate errors


# 1.19 07-Jan-2024 rillig

tests/make: test the '::=' modifier in target scope


# 1.18 31-Dec-2023 rillig

tests/make: finish incomplete sentence in test for assignment modifiers


# 1.17 29-Dec-2023 rillig

tests/make: test the '::=' assignment modifier


# 1.16 19-Nov-2023 rillig

tests/make: replace 'variable expression' with 'expression'

Each expression is based on a variable, there's no need for the
verbosity. The wording in make's diagnostics will be changed in a
follow-up commit.


Revision tags: netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base
# 1.15 09-Feb-2022 rillig

make: fix mistakes, spelling and typos in comments and manual page

No binary change for -DNDEBUG.


# 1.14 05-Dec-2021 rillig

tests/make: make test for '::=' easier to read, fix comments


# 1.13 30-Nov-2021 rillig

tests/make: convert tests for modifier '::=' to parse time

This puts the expected result of the expressions closer to the
expressions, making the tests self-contained.

The error messages that used to produce trailing spaces have been fixed
in var.c 1.853 from 2021-02-23. The error message now encloses the
variable name in quotes.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.12 15-Mar-2021 rillig

make: fix double varname expansion in the variable modifier '::='

This is an edge case that doesn't occur in practice since pretty much
nobody dares to use variable names that contain an actual '$' in their
name. This is not about the fairly common VAR.${param} (as written in
the makefile), but instead about the variable whose name is literally
'VAR.${param}'.

The test demonstrates that after the fix, the variable name is taken
exactly as-is for the simple assignment modifier '::='. There are no
such tests for the modifiers '::+=', '::!=' and '::?=', but that's ok.
The code in ApplyModifier_Assign would look assymetrical and suspicious
enough if one of these modifiers would expand its variable name and the
others wouldn't.


# 1.11 15-Mar-2021 rillig

tests/make: demonstrate that the modifier '::=' expands the varname


# 1.10 14-Feb-2021 rillig

make: add test for ::= modifier enclosed in parentheses


# 1.9 22-Jan-2021 rillig

make(1): remove outdated comment from test

It was fixed in var.c 1.472 from 2020-08-25.


# 1.8 18-Oct-2020 rillig

make(1): add test for the ::+= modifier expanding its right-hand side


# 1.7 18-Oct-2020 rillig

make(1): explain existing tests for the ::= assignment modifiers


# 1.6 25-Aug-2020 rillig

make(1): fix error message for ::!= modifier with shell error

It's just too easy to confuse st->val and val.


# 1.5 25-Aug-2020 rillig

make(1): add test for ::!= modifier with shell error


# 1.4 25-Aug-2020 rillig

make(1): move test for the ::= modifier to varmod-assign


# 1.3 25-Aug-2020 rillig

make(1): explain the varmod-assign test

I have no idea why I added the mod-assign-nested test. It is completely
boring and doesn't provide any insight.


# 1.2 16-Aug-2020 rillig

make(1): move tests for the :gmtime and ::= modifiers to separate files


# 1.1 16-Aug-2020 rillig

make(1): add dummies for fine-grained tests, one per single feature

The test names have been derived from the current manual page.

All these tests are dummies right now, and the code from the existing
tests will be moved into the new tests step by step.

This is done to prevent modmisc, escape, varmod-edge and varmisc from
growing without any bounds, and to reduce the side-effects of one test
to the others.


# 1.20 20-Apr-2024 rillig

make: provide more context information for parse/evaluate errors


# 1.19 07-Jan-2024 rillig

tests/make: test the '::=' modifier in target scope


# 1.18 31-Dec-2023 rillig

tests/make: finish incomplete sentence in test for assignment modifiers


# 1.17 29-Dec-2023 rillig

tests/make: test the '::=' assignment modifier


# 1.16 19-Nov-2023 rillig

tests/make: replace 'variable expression' with 'expression'

Each expression is based on a variable, there's no need for the
verbosity. The wording in make's diagnostics will be changed in a
follow-up commit.


Revision tags: netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base
# 1.15 09-Feb-2022 rillig

make: fix mistakes, spelling and typos in comments and manual page

No binary change for -DNDEBUG.


# 1.14 05-Dec-2021 rillig

tests/make: make test for '::=' easier to read, fix comments


# 1.13 30-Nov-2021 rillig

tests/make: convert tests for modifier '::=' to parse time

This puts the expected result of the expressions closer to the
expressions, making the tests self-contained.

The error messages that used to produce trailing spaces have been fixed
in var.c 1.853 from 2021-02-23. The error message now encloses the
variable name in quotes.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.12 15-Mar-2021 rillig

make: fix double varname expansion in the variable modifier '::='

This is an edge case that doesn't occur in practice since pretty much
nobody dares to use variable names that contain an actual '$' in their
name. This is not about the fairly common VAR.${param} (as written in
the makefile), but instead about the variable whose name is literally
'VAR.${param}'.

The test demonstrates that after the fix, the variable name is taken
exactly as-is for the simple assignment modifier '::='. There are no
such tests for the modifiers '::+=', '::!=' and '::?=', but that's ok.
The code in ApplyModifier_Assign would look assymetrical and suspicious
enough if one of these modifiers would expand its variable name and the
others wouldn't.


# 1.11 15-Mar-2021 rillig

tests/make: demonstrate that the modifier '::=' expands the varname


# 1.10 14-Feb-2021 rillig

make: add test for ::= modifier enclosed in parentheses


# 1.9 22-Jan-2021 rillig

make(1): remove outdated comment from test

It was fixed in var.c 1.472 from 2020-08-25.


# 1.8 18-Oct-2020 rillig

make(1): add test for the ::+= modifier expanding its right-hand side


# 1.7 18-Oct-2020 rillig

make(1): explain existing tests for the ::= assignment modifiers


# 1.6 25-Aug-2020 rillig

make(1): fix error message for ::!= modifier with shell error

It's just too easy to confuse st->val and val.


# 1.5 25-Aug-2020 rillig

make(1): add test for ::!= modifier with shell error


# 1.4 25-Aug-2020 rillig

make(1): move test for the ::= modifier to varmod-assign


# 1.3 25-Aug-2020 rillig

make(1): explain the varmod-assign test

I have no idea why I added the mod-assign-nested test. It is completely
boring and doesn't provide any insight.


# 1.2 16-Aug-2020 rillig

make(1): move tests for the :gmtime and ::= modifiers to separate files


# 1.1 16-Aug-2020 rillig

make(1): add dummies for fine-grained tests, one per single feature

The test names have been derived from the current manual page.

All these tests are dummies right now, and the code from the existing
tests will be moved into the new tests step by step.

This is done to prevent modmisc, escape, varmod-edge and varmisc from
growing without any bounds, and to reduce the side-effects of one test
to the others.


# 1.19 07-Jan-2024 rillig

tests/make: test the '::=' modifier in target scope


# 1.18 31-Dec-2023 rillig

tests/make: finish incomplete sentence in test for assignment modifiers


# 1.17 29-Dec-2023 rillig

tests/make: test the '::=' assignment modifier


# 1.16 19-Nov-2023 rillig

tests/make: replace 'variable expression' with 'expression'

Each expression is based on a variable, there's no need for the
verbosity. The wording in make's diagnostics will be changed in a
follow-up commit.


Revision tags: netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base
# 1.15 09-Feb-2022 rillig

make: fix mistakes, spelling and typos in comments and manual page

No binary change for -DNDEBUG.


# 1.14 05-Dec-2021 rillig

tests/make: make test for '::=' easier to read, fix comments


# 1.13 30-Nov-2021 rillig

tests/make: convert tests for modifier '::=' to parse time

This puts the expected result of the expressions closer to the
expressions, making the tests self-contained.

The error messages that used to produce trailing spaces have been fixed
in var.c 1.853 from 2021-02-23. The error message now encloses the
variable name in quotes.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.12 15-Mar-2021 rillig

make: fix double varname expansion in the variable modifier '::='

This is an edge case that doesn't occur in practice since pretty much
nobody dares to use variable names that contain an actual '$' in their
name. This is not about the fairly common VAR.${param} (as written in
the makefile), but instead about the variable whose name is literally
'VAR.${param}'.

The test demonstrates that after the fix, the variable name is taken
exactly as-is for the simple assignment modifier '::='. There are no
such tests for the modifiers '::+=', '::!=' and '::?=', but that's ok.
The code in ApplyModifier_Assign would look assymetrical and suspicious
enough if one of these modifiers would expand its variable name and the
others wouldn't.


# 1.11 15-Mar-2021 rillig

tests/make: demonstrate that the modifier '::=' expands the varname


# 1.10 14-Feb-2021 rillig

make: add test for ::= modifier enclosed in parentheses


# 1.9 22-Jan-2021 rillig

make(1): remove outdated comment from test

It was fixed in var.c 1.472 from 2020-08-25.


# 1.8 18-Oct-2020 rillig

make(1): add test for the ::+= modifier expanding its right-hand side


# 1.7 18-Oct-2020 rillig

make(1): explain existing tests for the ::= assignment modifiers


# 1.6 25-Aug-2020 rillig

make(1): fix error message for ::!= modifier with shell error

It's just too easy to confuse st->val and val.


# 1.5 25-Aug-2020 rillig

make(1): add test for ::!= modifier with shell error


# 1.4 25-Aug-2020 rillig

make(1): move test for the ::= modifier to varmod-assign


# 1.3 25-Aug-2020 rillig

make(1): explain the varmod-assign test

I have no idea why I added the mod-assign-nested test. It is completely
boring and doesn't provide any insight.


# 1.2 16-Aug-2020 rillig

make(1): move tests for the :gmtime and ::= modifiers to separate files


# 1.1 16-Aug-2020 rillig

make(1): add dummies for fine-grained tests, one per single feature

The test names have been derived from the current manual page.

All these tests are dummies right now, and the code from the existing
tests will be moved into the new tests step by step.

This is done to prevent modmisc, escape, varmod-edge and varmisc from
growing without any bounds, and to reduce the side-effects of one test
to the others.


# 1.18 31-Dec-2023 rillig

tests/make: finish incomplete sentence in test for assignment modifiers


# 1.17 29-Dec-2023 rillig

tests/make: test the '::=' assignment modifier


# 1.16 19-Nov-2023 rillig

tests/make: replace 'variable expression' with 'expression'

Each expression is based on a variable, there's no need for the
verbosity. The wording in make's diagnostics will be changed in a
follow-up commit.


Revision tags: netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base
# 1.15 09-Feb-2022 rillig

make: fix mistakes, spelling and typos in comments and manual page

No binary change for -DNDEBUG.


# 1.14 05-Dec-2021 rillig

tests/make: make test for '::=' easier to read, fix comments


# 1.13 30-Nov-2021 rillig

tests/make: convert tests for modifier '::=' to parse time

This puts the expected result of the expressions closer to the
expressions, making the tests self-contained.

The error messages that used to produce trailing spaces have been fixed
in var.c 1.853 from 2021-02-23. The error message now encloses the
variable name in quotes.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.12 15-Mar-2021 rillig

make: fix double varname expansion in the variable modifier '::='

This is an edge case that doesn't occur in practice since pretty much
nobody dares to use variable names that contain an actual '$' in their
name. This is not about the fairly common VAR.${param} (as written in
the makefile), but instead about the variable whose name is literally
'VAR.${param}'.

The test demonstrates that after the fix, the variable name is taken
exactly as-is for the simple assignment modifier '::='. There are no
such tests for the modifiers '::+=', '::!=' and '::?=', but that's ok.
The code in ApplyModifier_Assign would look assymetrical and suspicious
enough if one of these modifiers would expand its variable name and the
others wouldn't.


# 1.11 15-Mar-2021 rillig

tests/make: demonstrate that the modifier '::=' expands the varname


# 1.10 14-Feb-2021 rillig

make: add test for ::= modifier enclosed in parentheses


# 1.9 22-Jan-2021 rillig

make(1): remove outdated comment from test

It was fixed in var.c 1.472 from 2020-08-25.


# 1.8 18-Oct-2020 rillig

make(1): add test for the ::+= modifier expanding its right-hand side


# 1.7 18-Oct-2020 rillig

make(1): explain existing tests for the ::= assignment modifiers


# 1.6 25-Aug-2020 rillig

make(1): fix error message for ::!= modifier with shell error

It's just too easy to confuse st->val and val.


# 1.5 25-Aug-2020 rillig

make(1): add test for ::!= modifier with shell error


# 1.4 25-Aug-2020 rillig

make(1): move test for the ::= modifier to varmod-assign


# 1.3 25-Aug-2020 rillig

make(1): explain the varmod-assign test

I have no idea why I added the mod-assign-nested test. It is completely
boring and doesn't provide any insight.


# 1.2 16-Aug-2020 rillig

make(1): move tests for the :gmtime and ::= modifiers to separate files


# 1.1 16-Aug-2020 rillig

make(1): add dummies for fine-grained tests, one per single feature

The test names have been derived from the current manual page.

All these tests are dummies right now, and the code from the existing
tests will be moved into the new tests step by step.

This is done to prevent modmisc, escape, varmod-edge and varmisc from
growing without any bounds, and to reduce the side-effects of one test
to the others.


# 1.18 31-Dec-2023 rillig

tests/make: finish incomplete sentence in test for assignment modifiers


# 1.17 29-Dec-2023 rillig

tests/make: test the '::=' assignment modifier


# 1.16 19-Nov-2023 rillig

tests/make: replace 'variable expression' with 'expression'

Each expression is based on a variable, there's no need for the
verbosity. The wording in make's diagnostics will be changed in a
follow-up commit.


Revision tags: netbsd-10-0-RC1 netbsd-10-base
# 1.15 09-Feb-2022 rillig

make: fix mistakes, spelling and typos in comments and manual page

No binary change for -DNDEBUG.


# 1.14 05-Dec-2021 rillig

tests/make: make test for '::=' easier to read, fix comments


# 1.13 30-Nov-2021 rillig

tests/make: convert tests for modifier '::=' to parse time

This puts the expected result of the expressions closer to the
expressions, making the tests self-contained.

The error messages that used to produce trailing spaces have been fixed
in var.c 1.853 from 2021-02-23. The error message now encloses the
variable name in quotes.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.12 15-Mar-2021 rillig

make: fix double varname expansion in the variable modifier '::='

This is an edge case that doesn't occur in practice since pretty much
nobody dares to use variable names that contain an actual '$' in their
name. This is not about the fairly common VAR.${param} (as written in
the makefile), but instead about the variable whose name is literally
'VAR.${param}'.

The test demonstrates that after the fix, the variable name is taken
exactly as-is for the simple assignment modifier '::='. There are no
such tests for the modifiers '::+=', '::!=' and '::?=', but that's ok.
The code in ApplyModifier_Assign would look assymetrical and suspicious
enough if one of these modifiers would expand its variable name and the
others wouldn't.


# 1.11 15-Mar-2021 rillig

tests/make: demonstrate that the modifier '::=' expands the varname


# 1.10 14-Feb-2021 rillig

make: add test for ::= modifier enclosed in parentheses


# 1.9 22-Jan-2021 rillig

make(1): remove outdated comment from test

It was fixed in var.c 1.472 from 2020-08-25.


# 1.8 18-Oct-2020 rillig

make(1): add test for the ::+= modifier expanding its right-hand side


# 1.7 18-Oct-2020 rillig

make(1): explain existing tests for the ::= assignment modifiers


# 1.6 25-Aug-2020 rillig

make(1): fix error message for ::!= modifier with shell error

It's just too easy to confuse st->val and val.


# 1.5 25-Aug-2020 rillig

make(1): add test for ::!= modifier with shell error


# 1.4 25-Aug-2020 rillig

make(1): move test for the ::= modifier to varmod-assign


# 1.3 25-Aug-2020 rillig

make(1): explain the varmod-assign test

I have no idea why I added the mod-assign-nested test. It is completely
boring and doesn't provide any insight.


# 1.2 16-Aug-2020 rillig

make(1): move tests for the :gmtime and ::= modifiers to separate files


# 1.1 16-Aug-2020 rillig

make(1): add dummies for fine-grained tests, one per single feature

The test names have been derived from the current manual page.

All these tests are dummies right now, and the code from the existing
tests will be moved into the new tests step by step.

This is done to prevent modmisc, escape, varmod-edge and varmisc from
growing without any bounds, and to reduce the side-effects of one test
to the others.


# 1.16 19-Nov-2023 rillig

tests/make: replace 'variable expression' with 'expression'

Each expression is based on a variable, there's no need for the
verbosity. The wording in make's diagnostics will be changed in a
follow-up commit.


Revision tags: netbsd-10-0-RC1 netbsd-10-base
# 1.15 09-Feb-2022 rillig

make: fix mistakes, spelling and typos in comments and manual page

No binary change for -DNDEBUG.


# 1.14 05-Dec-2021 rillig

tests/make: make test for '::=' easier to read, fix comments


# 1.13 30-Nov-2021 rillig

tests/make: convert tests for modifier '::=' to parse time

This puts the expected result of the expressions closer to the
expressions, making the tests self-contained.

The error messages that used to produce trailing spaces have been fixed
in var.c 1.853 from 2021-02-23. The error message now encloses the
variable name in quotes.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.12 15-Mar-2021 rillig

make: fix double varname expansion in the variable modifier '::='

This is an edge case that doesn't occur in practice since pretty much
nobody dares to use variable names that contain an actual '$' in their
name. This is not about the fairly common VAR.${param} (as written in
the makefile), but instead about the variable whose name is literally
'VAR.${param}'.

The test demonstrates that after the fix, the variable name is taken
exactly as-is for the simple assignment modifier '::='. There are no
such tests for the modifiers '::+=', '::!=' and '::?=', but that's ok.
The code in ApplyModifier_Assign would look assymetrical and suspicious
enough if one of these modifiers would expand its variable name and the
others wouldn't.


# 1.11 15-Mar-2021 rillig

tests/make: demonstrate that the modifier '::=' expands the varname


# 1.10 14-Feb-2021 rillig

make: add test for ::= modifier enclosed in parentheses


# 1.9 22-Jan-2021 rillig

make(1): remove outdated comment from test

It was fixed in var.c 1.472 from 2020-08-25.


# 1.8 18-Oct-2020 rillig

make(1): add test for the ::+= modifier expanding its right-hand side


# 1.7 18-Oct-2020 rillig

make(1): explain existing tests for the ::= assignment modifiers


# 1.6 25-Aug-2020 rillig

make(1): fix error message for ::!= modifier with shell error

It's just too easy to confuse st->val and val.


# 1.5 25-Aug-2020 rillig

make(1): add test for ::!= modifier with shell error


# 1.4 25-Aug-2020 rillig

make(1): move test for the ::= modifier to varmod-assign


# 1.3 25-Aug-2020 rillig

make(1): explain the varmod-assign test

I have no idea why I added the mod-assign-nested test. It is completely
boring and doesn't provide any insight.


# 1.2 16-Aug-2020 rillig

make(1): move tests for the :gmtime and ::= modifiers to separate files


# 1.1 16-Aug-2020 rillig

make(1): add dummies for fine-grained tests, one per single feature

The test names have been derived from the current manual page.

All these tests are dummies right now, and the code from the existing
tests will be moved into the new tests step by step.

This is done to prevent modmisc, escape, varmod-edge and varmisc from
growing without any bounds, and to reduce the side-effects of one test
to the others.


# 1.15 09-Feb-2022 rillig

make: fix mistakes, spelling and typos in comments and manual page

No binary change for -DNDEBUG.


# 1.14 05-Dec-2021 rillig

tests/make: make test for '::=' easier to read, fix comments


# 1.13 30-Nov-2021 rillig

tests/make: convert tests for modifier '::=' to parse time

This puts the expected result of the expressions closer to the
expressions, making the tests self-contained.

The error messages that used to produce trailing spaces have been fixed
in var.c 1.853 from 2021-02-23. The error message now encloses the
variable name in quotes.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.12 15-Mar-2021 rillig

make: fix double varname expansion in the variable modifier '::='

This is an edge case that doesn't occur in practice since pretty much
nobody dares to use variable names that contain an actual '$' in their
name. This is not about the fairly common VAR.${param} (as written in
the makefile), but instead about the variable whose name is literally
'VAR.${param}'.

The test demonstrates that after the fix, the variable name is taken
exactly as-is for the simple assignment modifier '::='. There are no
such tests for the modifiers '::+=', '::!=' and '::?=', but that's ok.
The code in ApplyModifier_Assign would look assymetrical and suspicious
enough if one of these modifiers would expand its variable name and the
others wouldn't.


# 1.11 15-Mar-2021 rillig

tests/make: demonstrate that the modifier '::=' expands the varname


# 1.10 14-Feb-2021 rillig

make: add test for ::= modifier enclosed in parentheses


# 1.9 22-Jan-2021 rillig

make(1): remove outdated comment from test

It was fixed in var.c 1.472 from 2020-08-25.


# 1.8 18-Oct-2020 rillig

make(1): add test for the ::+= modifier expanding its right-hand side


# 1.7 18-Oct-2020 rillig

make(1): explain existing tests for the ::= assignment modifiers


# 1.6 25-Aug-2020 rillig

make(1): fix error message for ::!= modifier with shell error

It's just too easy to confuse st->val and val.


# 1.5 25-Aug-2020 rillig

make(1): add test for ::!= modifier with shell error


# 1.4 25-Aug-2020 rillig

make(1): move test for the ::= modifier to varmod-assign


# 1.3 25-Aug-2020 rillig

make(1): explain the varmod-assign test

I have no idea why I added the mod-assign-nested test. It is completely
boring and doesn't provide any insight.


# 1.2 16-Aug-2020 rillig

make(1): move tests for the :gmtime and ::= modifiers to separate files


# 1.1 16-Aug-2020 rillig

make(1): add dummies for fine-grained tests, one per single feature

The test names have been derived from the current manual page.

All these tests are dummies right now, and the code from the existing
tests will be moved into the new tests step by step.

This is done to prevent modmisc, escape, varmod-edge and varmisc from
growing without any bounds, and to reduce the side-effects of one test
to the others.


# 1.14 05-Dec-2021 rillig

tests/make: make test for '::=' easier to read, fix comments


# 1.13 30-Nov-2021 rillig

tests/make: convert tests for modifier '::=' to parse time

This puts the expected result of the expressions closer to the
expressions, making the tests self-contained.

The error messages that used to produce trailing spaces have been fixed
in var.c 1.853 from 2021-02-23. The error message now encloses the
variable name in quotes.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.12 15-Mar-2021 rillig

make: fix double varname expansion in the variable modifier '::='

This is an edge case that doesn't occur in practice since pretty much
nobody dares to use variable names that contain an actual '$' in their
name. This is not about the fairly common VAR.${param} (as written in
the makefile), but instead about the variable whose name is literally
'VAR.${param}'.

The test demonstrates that after the fix, the variable name is taken
exactly as-is for the simple assignment modifier '::='. There are no
such tests for the modifiers '::+=', '::!=' and '::?=', but that's ok.
The code in ApplyModifier_Assign would look assymetrical and suspicious
enough if one of these modifiers would expand its variable name and the
others wouldn't.


# 1.11 15-Mar-2021 rillig

tests/make: demonstrate that the modifier '::=' expands the varname


# 1.10 14-Feb-2021 rillig

make: add test for ::= modifier enclosed in parentheses


# 1.9 22-Jan-2021 rillig

make(1): remove outdated comment from test

It was fixed in var.c 1.472 from 2020-08-25.


# 1.8 18-Oct-2020 rillig

make(1): add test for the ::+= modifier expanding its right-hand side


# 1.7 18-Oct-2020 rillig

make(1): explain existing tests for the ::= assignment modifiers


# 1.6 25-Aug-2020 rillig

make(1): fix error message for ::!= modifier with shell error

It's just too easy to confuse st->val and val.


# 1.5 25-Aug-2020 rillig

make(1): add test for ::!= modifier with shell error


# 1.4 25-Aug-2020 rillig

make(1): move test for the ::= modifier to varmod-assign


# 1.3 25-Aug-2020 rillig

make(1): explain the varmod-assign test

I have no idea why I added the mod-assign-nested test. It is completely
boring and doesn't provide any insight.


# 1.2 16-Aug-2020 rillig

make(1): move tests for the :gmtime and ::= modifiers to separate files


# 1.1 16-Aug-2020 rillig

make(1): add dummies for fine-grained tests, one per single feature

The test names have been derived from the current manual page.

All these tests are dummies right now, and the code from the existing
tests will be moved into the new tests step by step.

This is done to prevent modmisc, escape, varmod-edge and varmisc from
growing without any bounds, and to reduce the side-effects of one test
to the others.


# 1.13 30-Nov-2021 rillig

tests/make: convert tests for modifier '::=' to parse time

This puts the expected result of the expressions closer to the
expressions, making the tests self-contained.

The error messages that used to produce trailing spaces have been fixed
in var.c 1.853 from 2021-02-23. The error message now encloses the
variable name in quotes.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.12 15-Mar-2021 rillig

make: fix double varname expansion in the variable modifier '::='

This is an edge case that doesn't occur in practice since pretty much
nobody dares to use variable names that contain an actual '$' in their
name. This is not about the fairly common VAR.${param} (as written in
the makefile), but instead about the variable whose name is literally
'VAR.${param}'.

The test demonstrates that after the fix, the variable name is taken
exactly as-is for the simple assignment modifier '::='. There are no
such tests for the modifiers '::+=', '::!=' and '::?=', but that's ok.
The code in ApplyModifier_Assign would look assymetrical and suspicious
enough if one of these modifiers would expand its variable name and the
others wouldn't.


# 1.11 15-Mar-2021 rillig

tests/make: demonstrate that the modifier '::=' expands the varname


# 1.10 14-Feb-2021 rillig

make: add test for ::= modifier enclosed in parentheses


# 1.9 22-Jan-2021 rillig

make(1): remove outdated comment from test

It was fixed in var.c 1.472 from 2020-08-25.


# 1.8 18-Oct-2020 rillig

make(1): add test for the ::+= modifier expanding its right-hand side


# 1.7 18-Oct-2020 rillig

make(1): explain existing tests for the ::= assignment modifiers


# 1.6 25-Aug-2020 rillig

make(1): fix error message for ::!= modifier with shell error

It's just too easy to confuse st->val and val.


# 1.5 25-Aug-2020 rillig

make(1): add test for ::!= modifier with shell error


# 1.4 25-Aug-2020 rillig

make(1): move test for the ::= modifier to varmod-assign


# 1.3 25-Aug-2020 rillig

make(1): explain the varmod-assign test

I have no idea why I added the mod-assign-nested test. It is completely
boring and doesn't provide any insight.


# 1.2 16-Aug-2020 rillig

make(1): move tests for the :gmtime and ::= modifiers to separate files


# 1.1 16-Aug-2020 rillig

make(1): add dummies for fine-grained tests, one per single feature

The test names have been derived from the current manual page.

All these tests are dummies right now, and the code from the existing
tests will be moved into the new tests step by step.

This is done to prevent modmisc, escape, varmod-edge and varmisc from
growing without any bounds, and to reduce the side-effects of one test
to the others.


# 1.12 15-Mar-2021 rillig

make: fix double varname expansion in the variable modifier '::='

This is an edge case that doesn't occur in practice since pretty much
nobody dares to use variable names that contain an actual '$' in their
name. This is not about the fairly common VAR.${param} (as written in
the makefile), but instead about the variable whose name is literally
'VAR.${param}'.

The test demonstrates that after the fix, the variable name is taken
exactly as-is for the simple assignment modifier '::='. There are no
such tests for the modifiers '::+=', '::!=' and '::?=', but that's ok.
The code in ApplyModifier_Assign would look assymetrical and suspicious
enough if one of these modifiers would expand its variable name and the
others wouldn't.


# 1.11 15-Mar-2021 rillig

tests/make: demonstrate that the modifier '::=' expands the varname


# 1.10 14-Feb-2021 rillig

make: add test for ::= modifier enclosed in parentheses


# 1.9 22-Jan-2021 rillig

make(1): remove outdated comment from test

It was fixed in var.c 1.472 from 2020-08-25.


# 1.8 18-Oct-2020 rillig

make(1): add test for the ::+= modifier expanding its right-hand side


# 1.7 18-Oct-2020 rillig

make(1): explain existing tests for the ::= assignment modifiers


# 1.6 25-Aug-2020 rillig

make(1): fix error message for ::!= modifier with shell error

It's just too easy to confuse st->val and val.


# 1.5 25-Aug-2020 rillig

make(1): add test for ::!= modifier with shell error


# 1.4 25-Aug-2020 rillig

make(1): move test for the ::= modifier to varmod-assign


# 1.3 25-Aug-2020 rillig

make(1): explain the varmod-assign test

I have no idea why I added the mod-assign-nested test. It is completely
boring and doesn't provide any insight.


# 1.2 16-Aug-2020 rillig

make(1): move tests for the :gmtime and ::= modifiers to separate files


# 1.1 16-Aug-2020 rillig

make(1): add dummies for fine-grained tests, one per single feature

The test names have been derived from the current manual page.

All these tests are dummies right now, and the code from the existing
tests will be moved into the new tests step by step.

This is done to prevent modmisc, escape, varmod-edge and varmisc from
growing without any bounds, and to reduce the side-effects of one test
to the others.


# 1.10 14-Feb-2021 rillig

make: add test for ::= modifier enclosed in parentheses


# 1.9 22-Jan-2021 rillig

make(1): remove outdated comment from test

It was fixed in var.c 1.472 from 2020-08-25.


# 1.8 18-Oct-2020 rillig

make(1): add test for the ::+= modifier expanding its right-hand side


# 1.7 18-Oct-2020 rillig

make(1): explain existing tests for the ::= assignment modifiers


# 1.6 25-Aug-2020 rillig

make(1): fix error message for ::!= modifier with shell error

It's just too easy to confuse st->val and val.


# 1.5 25-Aug-2020 rillig

make(1): add test for ::!= modifier with shell error


# 1.4 25-Aug-2020 rillig

make(1): move test for the ::= modifier to varmod-assign


# 1.3 25-Aug-2020 rillig

make(1): explain the varmod-assign test

I have no idea why I added the mod-assign-nested test. It is completely
boring and doesn't provide any insight.


# 1.2 16-Aug-2020 rillig

make(1): move tests for the :gmtime and ::= modifiers to separate files


# 1.1 16-Aug-2020 rillig

make(1): add dummies for fine-grained tests, one per single feature

The test names have been derived from the current manual page.

All these tests are dummies right now, and the code from the existing
tests will be moved into the new tests step by step.

This is done to prevent modmisc, escape, varmod-edge and varmisc from
growing without any bounds, and to reduce the side-effects of one test
to the others.


# 1.9 22-Jan-2021 rillig

make(1): remove outdated comment from test

It was fixed in var.c 1.472 from 2020-08-25.


# 1.8 18-Oct-2020 rillig

make(1): add test for the ::+= modifier expanding its right-hand side


# 1.7 18-Oct-2020 rillig

make(1): explain existing tests for the ::= assignment modifiers


# 1.6 25-Aug-2020 rillig

make(1): fix error message for ::!= modifier with shell error

It's just too easy to confuse st->val and val.


# 1.5 25-Aug-2020 rillig

make(1): add test for ::!= modifier with shell error


# 1.4 25-Aug-2020 rillig

make(1): move test for the ::= modifier to varmod-assign


# 1.3 25-Aug-2020 rillig

make(1): explain the varmod-assign test

I have no idea why I added the mod-assign-nested test. It is completely
boring and doesn't provide any insight.


# 1.2 16-Aug-2020 rillig

make(1): move tests for the :gmtime and ::= modifiers to separate files


# 1.1 16-Aug-2020 rillig

make(1): add dummies for fine-grained tests, one per single feature

The test names have been derived from the current manual page.

All these tests are dummies right now, and the code from the existing
tests will be moved into the new tests step by step.

This is done to prevent modmisc, escape, varmod-edge and varmisc from
growing without any bounds, and to reduce the side-effects of one test
to the others.