added @pragma rwpipe
All checks were successful
continuous-integration/drone/push Build is passing

changed || to |& for bidirectional piping
This commit is contained in:
2025-10-04 01:39:25 +09:00
parent 203a0660ef
commit 2bc122f23a
11 changed files with 104 additions and 59 deletions

10
t/two-way-pipe.hawk Normal file
View File

@ -0,0 +1,10 @@
BEGIN {
cmd = "sort";
data = hawk::array("hello", "world", "two-way pipe", "testing");
for (i = 1; i <= length(data); i++) print data[i] |& cmd;
close(cmd, "to");
while ((cmd |& getline line) > 0) print line;
close(cmd);
}