From 6ad6a84346f5655516d4ef0c4ac8328c2a034fed Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sun, 17 Oct 2021 21:01:14 -0700 Subject: [PATCH] Added docs and test shell scripts. --- docs.sh | 2 ++ test.sh | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100755 docs.sh create mode 100755 test.sh diff --git a/docs.sh b/docs.sh new file mode 100755 index 0000000..e44b87e --- /dev/null +++ b/docs.sh @@ -0,0 +1,2 @@ + dartdoc + open doc/api/index.html 2> /dev/null diff --git a/test.sh b/test.sh new file mode 100755 index 0000000..4a86e4f --- /dev/null +++ b/test.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +TMPCAT=/tmp/tmp-cat +TMPDCAT=/tmp/tmp-dcat +RED='\033[0;31m' +GREEN='\033[0;32m' + +for o in -A -b -e -E -n -s -t -T -v +do + cat $o test/* > $TMPCAT + bin/dcat $o test/* > $TMPDCAT + if ! $(diff -q $TMPCAT $TMPDCAT); + then + echo -e "${RED}Test failed: $o" >&2 + exit + fi +done + +rm -rf $TMPCAT $TMPDCAT + +echo -e "${GREEN}All tests passed."