aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tests/test-str-expand.c
diff options
context:
space:
mode:
authorDavid M. Syzdek <david@syzdek.net>2022-03-16 23:39:14 -0800
committerDavid M. Syzdek <david@syzdek.net>2022-03-16 23:39:14 -0800
commitb5fd4adf51b0d1093d73a848bc1249bb9123f5b7 (patch)
treefe2e9a0ebd264fe16b9923c8956b79871d99e64c /tests/test-str-expand.c
parent1c8e1e265f22ae307b94d35d306dd53877eee309 (diff)
downloadtinyrad-b5fd4adf51b0d1093d73a848bc1249bb9123f5b7.tar.gz
tinyrad-b5fd4adf51b0d1093d73a848bc1249bb9123f5b7.tar.bz2
tinyrad-b5fd4adf51b0d1093d73a848bc1249bb9123f5b7.tar.xz
tinyrad-b5fd4adf51b0d1093d73a848bc1249bb9123f5b7.zip
libtinyrad: adding quotation processing to tinyrad_strexpand()
Diffstat (limited to 'tests/test-str-expand.c')
-rw-r--r--tests/test-str-expand.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/tests/test-str-expand.c b/tests/test-str-expand.c
index 3a36ed2..f88e882 100644
--- a/tests/test-str-expand.c
+++ b/tests/test-str-expand.c
@@ -86,17 +86,19 @@ typedef struct my_test_strings
86 86
87static const MyTestStr test_strings[] = 87static const MyTestStr test_strings[] =
88{ 88{
89 { "asdfghj", "asdfghj" }, 89 { "asdfghj", "asdfghj" },
90 { "\\141\\163\\144\\146\\147\\150\\152", "asdfghj" }, 90 { "'asdfghj'", "asdfghj" },
91 { "\\x61\\x73\\x64\\x66\\x67\\x68\\x6a", "asdfghj" }, 91 { "\"asdfghj\"", "asdfghj" },
92 { "a\\163\\x64f\\147\\x68j", "asdfghj" }, 92 { "\"\\141\\163\\144\\146\\147\\150\\152\"", "asdfghj" },
93 { "a%%sdfghj", "a%sdfghj" }, 93 { "\"\\x61\\x73\\x64\\x66\\x67\\x68\\x6a\"", "asdfghj" },
94 { "%u:x:%U:%G:test user:%d:/bin/false", NULL }, 94 { "\"a\\163\\x64f\\147\\x68j\"", "asdfghj" },
95 { "%g:x:%G:%u,root", NULL }, 95 { "\"a%%sdfghj\"", "a%sdfghj" },
96 { "Is %p running successfully?", NULL }, 96 { "\"%u:x:%U:%G:test user:%d:/bin/false\"", NULL },
97 { "Is your email address %u@%D\?", NULL }, 97 { "\"%g:x:%G:%u,root\"", NULL },
98 { "is your email address %u@%H\?", NULL }, 98 { "\"Is %p running successfully?\"", NULL },
99 { "Is your email address %u@%h.%D\?", NULL }, 99 { "\"Is your email address %u@%D\?\"", NULL },
100 { "\"is your email address %u@%H\?\"", NULL },
101 { "\"Is your email address %u@%h.%D\?\"", NULL },
100 { NULL, NULL } 102 { NULL, NULL }
101}; 103};
102 104