summaryrefslogtreecommitdiff
path: root/lib/subunit/c/tests/test_child.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-09-30 09:29:42 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-09-30 09:29:42 +0200
commite36f72628173ad476744670a5dbf25a3335e0a19 (patch)
tree4e2fde3d1969da1726a4e3202e5d41f2bf6172d9 /lib/subunit/c/tests/test_child.c
parent41182200a35083a0010f95f622a4ce386c5f0518 (diff)
downloadsamba-e36f72628173ad476744670a5dbf25a3335e0a19.tar.gz
samba-e36f72628173ad476744670a5dbf25a3335e0a19.tar.bz2
samba-e36f72628173ad476744670a5dbf25a3335e0a19.zip
subunit: Import new upstream snapshot (adds subunit_progress())
Diffstat (limited to 'lib/subunit/c/tests/test_child.c')
-rw-r--r--lib/subunit/c/tests/test_child.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/lib/subunit/c/tests/test_child.c b/lib/subunit/c/tests/test_child.c
index 6399eeb645..0744599b9f 100644
--- a/lib/subunit/c/tests/test_child.c
+++ b/lib/subunit/c/tests/test_child.c
@@ -164,6 +164,44 @@ START_TEST (test_skip)
}
END_TEST
+
+static void
+call_test_progress_pop(void)
+{
+ subunit_progress(SUBUNIT_PROGRESS_POP, 0);
+}
+
+static void
+call_test_progress_set(void)
+{
+ subunit_progress(SUBUNIT_PROGRESS_SET, 5);
+}
+
+static void
+call_test_progress_push(void)
+{
+ subunit_progress(SUBUNIT_PROGRESS_PUSH, 0);
+}
+
+static void
+call_test_progress_cur(void)
+{
+ subunit_progress(SUBUNIT_PROGRESS_CUR, -6);
+}
+
+START_TEST (test_progress)
+{
+ test_stdout_function("progress: pop\n",
+ call_test_progress_pop);
+ test_stdout_function("progress: push\n",
+ call_test_progress_push);
+ test_stdout_function("progress: 5\n",
+ call_test_progress_set);
+ test_stdout_function("progress: -6\n",
+ call_test_progress_cur);
+}
+END_TEST
+
static Suite *
child_suite(void)
{
@@ -175,6 +213,7 @@ child_suite(void)
tcase_add_test (tc_core, test_fail);
tcase_add_test (tc_core, test_error);
tcase_add_test (tc_core, test_skip);
+ tcase_add_test (tc_core, test_progress);
return s;
}