Commit Graph

5 Commits

Author SHA1 Message Date
Dave Reisner
e0eaca918e fix valid_number_of_base
function execution halts entirely on a invalid base, so we never
actually get to our 'return 1'. I'm not sure how our expected failures
ever actually worked, but it's quite plain to see that:

  $ a=$(( 2#3 )); echo hi

Never echos "hi". Use a subshell in valid_number_of_base so that we can
properly "trap" execution, and return a meaningful result.
2014-12-15 13:40:00 -05:00
Dave Reisner
25c058a2a2 explicitly exit from TEST_exit
This prevents some odd interactions with the EXIT trap, and our last
command's status is seemingly not preserved for the script's real exit.

Add a BASH override to the Makefile as well, as it might be useful for
debugging or testing against other versions of bash.
2014-12-15 08:38:43 -05:00
Dave Reisner
80466e0412 common: add support for getting optstr values 2014-04-06 10:48:15 -04:00
Dave Reisner
c0b87a0495 add option twiddling functions
these will be used in genfstab
2014-04-06 10:48:15 -04:00
Dave Reisner
a1b4145ff2 Add tests for some common functions 2013-12-08 22:59:15 -05:00