summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Savoye <rob@welcomehome.org>2010-11-29 10:32:27 -0700
committerRob Savoye <rob@welcomehome.org>2010-11-29 10:32:27 -0700
commit47c2db981d40efc79b88dba94e29b25b50a45923 (patch)
tree769a13072187e60f9a4e31fa250e4ca9b40999a6
parent75c52385ecc1ca66caa2986cffe9105f9532895f (diff)
add cat test for the new port
-rw-r--r--gr-run-waveform/guile/cat.scm3
-rw-r--r--gr-run-waveform/test_xyzzy.cc8
2 files changed, 10 insertions, 1 deletions
diff --git a/gr-run-waveform/guile/cat.scm b/gr-run-waveform/guile/cat.scm
index 575f1f5082..6a5a38acfa 100644
--- a/gr-run-waveform/guile/cat.scm
+++ b/gr-run-waveform/guile/cat.scm
@@ -6,6 +6,9 @@
(write-char ch (current-output-port))
(loop (read-char input-port))))))
+(define foo (make-gnuradio-port "ice-9/boot-9.scm"))
+;;(define foo (cat (make-gnuradio-port "ice-9/boot-9.scm")))
+
;; # Then start guile and use it
;; guile> (load "/tmp/cat.scm")
;; guile> (cat (open-file "/etc/passwd" "r"))
diff --git a/gr-run-waveform/test_xyzzy.cc b/gr-run-waveform/test_xyzzy.cc
index 201b571b5c..c8c91a7a59 100644
--- a/gr-run-waveform/test_xyzzy.cc
+++ b/gr-run-waveform/test_xyzzy.cc
@@ -44,7 +44,6 @@ inner_main (void *data, int argc, char **argv)
fprintf(stderr, "TRACE %s: %d\n", __FUNCTION__, __LINE__);
scm_xyzzy_init();
-// const char *ccc = SRCDIR;
string srcdir = SRCDIR;
// Lasd readline, as it makes life on he guile command lne
@@ -98,6 +97,13 @@ inner_main (void *data, int argc, char **argv)
} else {
fprintf(stderr, "FAILED: loading cat.scm\n" );
}
+ s_symbol = scm_c_lookup("foo");
+ SCM result = scm_input_port_p (s_symbol);
+ if (scm_is_true(result)) {
+ fprintf(stderr, "FAILED: make-gnuradio-port()\n");
+ } else {
+ fprintf(stderr, "PASSED: make-gnuradio-port()\n" );
+ }
scm_flush_all_ports();
scm_shell (argc, argv);