Commits

Peter Bex committed 6ea6579

Implement <<-redirection

Comments (0)

Files changed (2)

      (duplicate-fileno (file-open (maybe-symbol->string `?file-name)
                                   open/rdonly)
                        `?fd))
-    ((_ (<< ?fd ?object)) (error "<< currently not implemented"))
+    ((_ (<< ?fd ?object))
+     (fork/pipe (lambda () (display ?object))))
     ((_ (= ?fd-from ?fd/port-to))
      (let* ((fd/port-to ?fd/port-to)    ; Evaluate once
             (fd-to (if (port? fd/port-to)
       
       (test "Redirecting from object"
             '("blah" "foo" "testing, 1 2 3")
-            (run/strings (cat tmpfile -) (<< "testing, 1 2 3")))
+            (run/strings (cat ,tmpfile -) (<< "testing, 1 2 3")))
       (delete-file* tmpfile)))
 
   (test-group "Subprocesses"