Skip to content
Commit 4169eae1 authored by Max Rees's avatar Max Rees Committed by sroracle
Browse files

fflush in src/list.c to make tested behavior consistent

On glibc, if output is redirected to a file, output will look like this:

touch test/ok/gif
touch test/ok/jpg
touch test/ok/png
touch test/ok/pnm
test/ok/gif
test/ok/jpg
test/ok/png
test/ok/pnm

On musl, if stdout is redirected to a file, output looks like this:

test/ok/gif
touch test/ok/gif
touch test/ok/jpg
touch test/ok/png
touch test/ok/pnm
test/ok/jpg
test/ok/png
test/ok/pnm

On glibc and musl, if stdout is interactive, it looks like this:

test/ok/gif
touch test/ok/gif
test/ok/jpg
touch test/ok/jpg
test/ok/png
touch test/ok/png
test/ok/pnm
touch test/ok/pnm

Adding two fflush calls makes all behavior look like the last example.
Test cases have been updated accordingly.
parent 0911570b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment