aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/runtest.libs/testsuite_can.test29
1 files changed, 29 insertions, 0 deletions
diff --git a/testsuite/runtest.libs/testsuite_can.test b/testsuite/runtest.libs/testsuite_can.test
new file mode 100644
index 0000000..98d4e38
--- /dev/null
+++ b/testsuite/runtest.libs/testsuite_can.test
@@ -0,0 +1,29 @@
+# test "testsuite can" API call -*- Tcl -*-
+
+if [ file exists $srcdir/$subdir/default_procs.tcl ] {
+ source "$srcdir/$subdir/default_procs.tcl"
+} else {
+ puts "ERROR: $srcdir/$subdir/default_procs.tcl doesn't exist"
+}
+if [ file exists $srcdir/../lib/framework.exp] {
+ source $srcdir/../lib/framework.exp
+} else {
+ puts "ERROR: $srcdir/../lib/framework.exp doesn't exist"
+}
+
+# API availability check tests
+
+run_tests {
+ { lib_errpat_test testsuite { can }
+ "*unknown feature test*"
+ "testsuite can without arguments" }
+ { lib_errpat_test testsuite { can call }
+ "*unknown feature test*"
+ "testsuite can call without 'api'" }
+ { lib_bool_test testsuite { can call api } false
+ "testsuite can call api returns false for null API call name" }
+ { lib_bool_test testsuite { can call api testsuite can call api } true
+ "testsuite can call api reports its own existence" }
+}
+
+puts "END testsuite_can.test"