summaryrefslogtreecommitdiffstats
path: root/perl/test_fallthrough
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2008-04-14 21:52:55 -0400
committerBrian Cully <github.20.shmit@spamgourmet.com>2008-04-14 21:52:55 -0400
commit6ba98a9f9f48e13738d9736cba9c45b5e94f42f2 (patch)
tree86d7c281bcdbf67eb53cee064aa905e740ec5ccf /perl/test_fallthrough
downloadnastd-6ba98a9f9f48e13738d9736cba9c45b5e94f42f2.tar.gz
nastd-6ba98a9f9f48e13738d9736cba9c45b5e94f42f2.zip
Initial import
Diffstat (limited to 'perl/test_fallthrough')
-rwxr-xr-xperl/test_fallthrough38
1 files changed, 38 insertions, 0 deletions
diff --git a/perl/test_fallthrough b/perl/test_fallthrough
new file mode 100755
index 0000000..50feed8
--- /dev/null
+++ b/perl/test_fallthrough
@@ -0,0 +1,38 @@
+#!/usr/bin/perl
+
+use NASTD;
+
+$nasthole = &NASTD::nast_sphincter_new();
+if (!defined($nasthole)) {
+ exit(1);
+}
+
+@options = &NASTD::nast_options_get($nasthole);
+if (!defined(@options)) {
+ print STDERR "Couldn't get options: " .
+ &NASTD::nast_errmsg($nasthole) . "\n";
+ exit(1);
+}
+
+$options[5] = 1;
+if (&NASTD::nast_options_set($nasthole, @options) == -1) {
+ print STDERR "Couldn't set options: " .
+ &NASTD::nast_errmsg($nasthole) . "\n";
+ exit(1);
+}
+
+if (&NASTD::nast_get($nasthole, "asljkda") == -1) {
+ print STDERR "Couldn't perform get: " .
+ &NASTD::nast_errmsg($nasthole) . "\n";
+ exit(1);
+}
+
+@vals = &NASTD::nast_get_result($nasthole);
+$nitems = $#vals + 1;
+print "Number of columns: " . $nitems . "\n";
+for ($i = 0; $i < $nitems; $i++) {
+ $val = shift(@vals);
+ print "Result[$i]: $val\n";
+}
+
+&NASTD::nast_sphincter_close($nasthole);