summaryrefslogtreecommitdiff
path: root/Examples/test-suite/tcl/null_pointer_runme.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/tcl/null_pointer_runme.tcl')
-rw-r--r--Examples/test-suite/tcl/null_pointer_runme.tcl21
1 files changed, 21 insertions, 0 deletions
diff --git a/Examples/test-suite/tcl/null_pointer_runme.tcl b/Examples/test-suite/tcl/null_pointer_runme.tcl
new file mode 100644
index 000000000..be99c7166
--- /dev/null
+++ b/Examples/test-suite/tcl/null_pointer_runme.tcl
@@ -0,0 +1,21 @@
+if [ catch { load ./null_pointer[info sharedlibextension] null_pointer} err_msg ] {
+ puts stderr "Could not load shared object:\n$err_msg"
+}
+
+set a [A]
+if {[func $a] != 0} {
+ puts stderr "null_pointer test 1 failed"
+ exit 1
+}
+
+set null [getnull]
+if {$null != "NULL"} {
+ puts stderr "null_pointer test 2 failed"
+ exit 1
+}
+
+if {[llength [info commands "NULL"]] != 0} {
+ puts stderr "null_pointer test 3 failed"
+ exit 1
+}
+