diff options
| author | Mikhail <mp39590@gmail.com> | 2017-03-09 09:32:43 -0400 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2017-03-25 07:56:52 -0300 |
| commit | 9b7dbed58ebd3aeee16b044fdffda6b39e90643e (patch) | |
| tree | 25f919a885e83e43954ef085ececbd849463f447 /test/test-lib-FREEBSD.sh | |
| parent | e1ddd27968673e6785300e739f5257b83841fb97 (diff) | |
tests: add compatibility layer
Make test-lib-common.sh load test-lib-<$PLATFORM>.sh to create
additional shim for platform specifics.
Use test-lib-FREEBSD.sh to call GNU utilities instead of native ones.
- amended by db following Tomi's suggestions
Diffstat (limited to 'test/test-lib-FREEBSD.sh')
| -rw-r--r-- | test/test-lib-FREEBSD.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test-lib-FREEBSD.sh b/test/test-lib-FREEBSD.sh new file mode 100644 index 00000000..d1840b56 --- /dev/null +++ b/test/test-lib-FREEBSD.sh @@ -0,0 +1,9 @@ +# If present, use GNU Coreutils instead of a native BSD utils +if command -v gdate >/dev/null + then + date () { gdate "$@"; } + base64 () { gbase64 "$@"; } + wc () { gwc "$@"; } + sed () { gsed "$@"; } + sha256sum () { gsha256sum "$@"; } + fi |
