Skip to content
Snippets Groups Projects
  • Max Rees's avatar
    4169eae1
    fflush in src/list.c to make tested behavior consistent · 4169eae1
    Max Rees authored
    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.
    4169eae1
    History
    fflush in src/list.c to make tested behavior consistent
    Max Rees authored
    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.