My use of quoting quotes was causing the issue. If I change
test='"x"'
to instead be
test='x'
Then the argument accepts the variable.