Lines Matching refs:escape_arg
84 TEST(adb_utils, escape_arg) { argument
85 EXPECT_EQ(R"('')", escape_arg(""));
87 EXPECT_EQ(R"('abc')", escape_arg("abc"));
91 EXPECT_EQ(wrap(q), escape_arg("'"));
92 EXPECT_EQ(wrap(q + q), escape_arg("''"));
93 EXPECT_EQ(wrap(q + "abc" + q), escape_arg("'abc'"));
94 EXPECT_EQ(wrap(q + "abc"), escape_arg("'abc"));
95 EXPECT_EQ(wrap("abc" + q), escape_arg("abc'"));
96 EXPECT_EQ(wrap("abc" + q + "def"), escape_arg("abc'def"));
97 EXPECT_EQ(wrap("a" + q + "b" + q + "c"), escape_arg("a'b'c"));
98 EXPECT_EQ(wrap("a" + q + "bcde" + q + "f"), escape_arg("a'bcde'f"));
100 EXPECT_EQ(R"(' abc')", escape_arg(" abc"));
107 EXPECT_EQ(R"('abc"abc')", escape_arg("abc\"abc"));
108 EXPECT_EQ(R"('abc\abc')", escape_arg("abc\\abc"));
109 EXPECT_EQ(R"('abc(abc')", escape_arg("abc(abc"));
110 EXPECT_EQ(R"('abc)abc')", escape_arg("abc)abc"));
112 EXPECT_EQ(R"('abc ')", escape_arg("abc "));