Discussion:
test/test.test
Add Reply
Rob Landley
2018-12-01 23:14:38 UTC
Reply
Permalink
$ gcc pear.c
$ ./a.out | sed -e '1i#!/bin/bash' -e 's/.*/test & ; echo $?/' > blah.sh
$ chmod +x blah.sh
$ ./blah.sh | wc

So... tests for test. With 5376 true/false results. Probably overkill? (This
tests parentheses vs -a and -o prioritization for all combinations of 3 -a/-o
tests and 4 pairs of parentheses. Dunno about "right" but I can check "matches
bash"...

Rob
Rob Landley
2018-12-02 20:53:46 UTC
Reply
Permalink
Post by Rob Landley
$ gcc pear.c
$ ./a.out | sed -e '1i#!/bin/bash' -e 's/.*/test & ; echo $?/' > blah.sh
$ chmod +x blah.sh
$ ./blah.sh | wc
So... tests for test. With 5376 true/false results. Probably overkill? (This
tests parentheses vs -a and -o prioritization for all combinations of 3 -a/-o
tests and 4 pairs of parentheses. Dunno about "right" but I can check "matches
bash"...
Rob
Darn it. It's not:

( x ) -y ( x ) -y ( x )

It's:

! ( ! x ) - y ! ( ! x ) -y ! ( ! x )

6 more bits to test, 2 million total combinations.

Hmmm...

Rob

Loading...