tests: Add variable expansion tests

There are some corner cases in variable expansion which would be nice to
capture before going and rewriting the variable expansion code. The
majority of these are related to configuring files and strings with '@'
in them in conjunction with @ONLY being specified. Another is testing
for '(' usage inside of ENV variable references based on whether it is
quoted or not.
Merge topic 'variable-expansion-tests' into next

a9bdef2d tests: Add variable expansion tests