[Toybox] test/test.test

Rob Landley rob at landley.net
Sun Dec 2 12:53:46 PST 2018


On 12/1/18 5:14 PM, Rob Landley wrote:
> $ 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



More information about the Toybox mailing list