Skip to content

Commit

Permalink
Make test more resistant to parallelisation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisJefferson committed Oct 10, 2020
1 parent 0f8f080 commit 6674a19
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tst/testinstall/testunix/streams.tst
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,23 @@ gap> START_TEST("streams.tst");
#
# input/output streams
#
# GetLine can return a partial line
gap> ReallyReadLine := function(s)
> local out;
> out := "";
> while Length(out) = 0 or Last(out) <> '\n' do
> Append(out,ReadLine(s));
> od;
> return out;
> end;;
gap> d := DirectoryCurrent();;
#@if ARCH_IS_UNIX()
gap> f := Filename(DirectoriesSystemPrograms(), "cat");;
gap> s := InputOutputLocalProcess(d,f,[]);
< input/output stream to cat >
gap> WriteLine(s,"The cat sat on the mat");
true
gap> repeat str := ReadLine(s); until str <> fail; str;
gap> repeat str := ReallyReadLine(s); until str <> fail; str;
"The cat sat on the mat\n"
gap> WriteLine(s,"abc");
true
Expand Down

0 comments on commit 6674a19

Please sign in to comment.