def test_gn_string(self): assert gn_string('abc') == '"abc"' assert gn_string('foo$bar"baz') == '"foo\\$bar\\"baz"' assert gn_string('do\\not\\escape') == '"do\\not\\escape"' assert gn_string('so\\\\very\\"fun\\') == '"so\\\\\\very\\\\\\"fun\\"'
def gn_string_test(): assert '"abc"' == gn_string('abc') assert '"foo\\$bar\\"baz"' == gn_string('foo$bar"baz') assert '"do\\not\\escape"' == gn_string('do\\not\\escape') assert '"so\\\\\\very\\\\\\"fun\\"' == gn_string('so\\\\very\\"fun\\')