summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorYuang Li <yuangli@uk-yuangli-l.dhcp.mathworks.com>2022-06-27 13:35:46 +0100
committerYuang Li <yuangli@uk-yuangli-l.dhcp.mathworks.com>2022-06-27 13:35:46 +0100
commit7a936258ddc93e012be8182a08f3c3e220bc6cbc (patch)
treeae972421e7f646e784fb4ad9d2e92122125d3b83 /tests
parent13bd14d930006bc01b89f9fd4d0b074c387ef92f (diff)
downloadlibgit2-7a936258ddc93e012be8182a08f3c3e220bc6cbc.tar.gz
add test for shallow feature flag
Diffstat (limited to 'tests')
-rw-r--r--tests/shallow/feature_flag.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/shallow/feature_flag.c b/tests/shallow/feature_flag.c
new file mode 100644
index 000000000..25d283a44
--- /dev/null
+++ b/tests/shallow/feature_flag.c
@@ -0,0 +1,11 @@
+#include "clar_libgit2.h"
+
+void test_shallow_feature_flag__set_feature_flag(void)
+{
+ cl_must_pass(git_libgit2_opts(GIT_OPT_ENABLE_SHALLOW, 1));
+}
+
+void test_shallow_feature_flag__unset_feature_flag(void)
+{
+ cl_must_pass(git_libgit2_opts(GIT_OPT_ENABLE_SHALLOW, 0));
+}