Commit Graph

3 Commits

Author SHA1 Message Date
Chris Darroch
fef4c0ff98 t: pipe data to base64 to be compatible with macOS
The base64(1) binary provided with macOS does not accept a bare input
file name, unlike any of the GNU coreutils implementations of base64(1)
or either the older Fourmilab or newer bintrans(1) BSD implementations.
Instead, it appears to be a version unique to OS X which requires an -i
option before a file name to be used for input.  See, for reference:

  https://www.unix.com/man-page/osx/1/base64/
  https://man7.org/linux/man-pages/man1/base64.1.html
  https://www.fourmilab.ch/webtools/base64/
  https://man.freebsd.org/cgi/man.cgi?query=base64&manpath=FreeBSD+15.0-CURRENT

With the Xcode developer tools for macOS installed, along with Go, Git,
etc., our test suite mostly succeeds, but several tests fail because
they expect to call base64(1) and pass the bare /dev/urandom file name.

We can resolve this inconvenience for developers by adjusting those
tests to use the technique we already use in the t/t-migrate-*.sh
test suites where we redirect /dev/urandom into base64 as its
standard input.  This allows the test suites to function on both
macOS as well as Linux systems which use one of the other base64(1)
implementations.
2024-01-10 20:29:43 -08:00
Taylor Blau
de9152049c t: load shell scripts from $(dirname) instead of 't' 2018-07-10 13:51:40 -05:00
Taylor Blau
219b7e0a3d t: prefix all existing tests with t- 2018-07-09 16:24:25 -05:00