aboutsummaryrefslogtreecommitdiffstats
path: root/tests/blogc-git-receiver
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2016-12-21 23:12:05 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2016-12-21 23:12:05 +0100
commitb9ec274bed571db9c705b65bb8c0bb6409c34fc4 (patch)
treec5c4a8f5e5dd906772916fea1084659dc725d5f9 /tests/blogc-git-receiver
parent209ea0657b7970b4b8069ce44b43eecb97681892 (diff)
downloadblogc-b9ec274bed571db9c705b65bb8c0bb6409c34fc4.tar.gz
blogc-b9ec274bed571db9c705b65bb8c0bb6409c34fc4.tar.bz2
blogc-b9ec274bed571db9c705b65bb8c0bb6409c34fc4.zip
git-receiver: moved shell quote function to common
Diffstat (limited to 'tests/blogc-git-receiver')
-rw-r--r--tests/blogc-git-receiver/check_shell_command_parser.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/tests/blogc-git-receiver/check_shell_command_parser.c b/tests/blogc-git-receiver/check_shell_command_parser.c
index 9d0e282..a97df60 100644
--- a/tests/blogc-git-receiver/check_shell_command_parser.c
+++ b/tests/blogc-git-receiver/check_shell_command_parser.c
@@ -205,40 +205,11 @@ test_shell_command_parse(void **state)
}
-static void
-test_shell_quote(void **state)
-{
- char *t;
- t = bgr_shell_quote(NULL);
- assert_string_equal(t, "''");
- free(t);
- t = bgr_shell_quote("!bola");
- assert_string_equal(t, "''\\!'bola'");
- free(t);
- t = bgr_shell_quote("'bola");
- assert_string_equal(t, "''\\''bola'");
- free(t);
- t = bgr_shell_quote("bo!bola");
- assert_string_equal(t, "'bo'\\!'bola'");
- free(t);
- t = bgr_shell_quote("bo'bola");
- assert_string_equal(t, "'bo'\\''bola'");
- free(t);
- t = bgr_shell_quote("bola!");
- assert_string_equal(t, "'bola'\\!''");
- free(t);
- t = bgr_shell_quote("bola'");
- assert_string_equal(t, "'bola'\\'''");
- free(t);
-}
-
-
int
main(void)
{
const UnitTest tests[] = {
unit_test(test_shell_command_parse),
- unit_test(test_shell_quote),
};
return run_tests(tests);
}