I do hope none of your tests is capable of producing output that contains shell metacharacters ... perhaps "$TEST_OUTPUT" would be safer ...