--- /dev/null
+addFilter("hidden-file-or-dir .*/usr/share/man/man1/..1.gz")
--- /dev/null
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+ <assign>
+ <filesystem path="/bin/*" exec_label="none" />
+ </assign>
+</manifest>
\ No newline at end of file
--- /dev/null
+%define run_tests 0
+%if %{run_tests}
+ # check is defined off at .rpmmacros file.
+ %undefine check
+%endif
+
+Name: bash
+Version: 3.2.57
+Release: 1
+License: GPL-2.0+
+Summary: The GNU Bourne Again shell
+Url: http://www.gnu.org/software/bash
+Group: Base/Utilities
+Source0: %{name}-%{version}.tar.gz
+Source1001: bash.manifest
+BuildRequires: autoconf
+BuildRequires: bison
+BuildRequires: fdupes
+Provides: /bin/bash
+Provides: /bin/sh
+
+%description
+The GNU Bourne Again shell (Bash) is a shell or command language
+interpreter that is compatible with the Bourne shell (sh). Bash
+incorporates useful features from the Korn shell (ksh) and the C shell
+(csh). Most sh scripts can be run by bash without modification.
+
+
+%prep
+%setup -q
+cp %{SOURCE1001} .
+
+%build
+%configure --enable-largefile \
+ --without-bash-malloc \
+ --disable-nls \
+ --enable-alias \
+ --enable-readline \
+ --enable-history
+
+# Recycles pids is neccessary. When bash's last fork's pid was X
+# and new fork's pid is also X, bash has to wait for this same pid.
+# Without Recycles pids bash will not wait.
+make "CPPFLAGS=-D_GNU_SOURCE -DDEFAULT_PATH_VALUE='\"/usr/local/bin:/usr/bin\"' -DRECYCLES_PIDS `getconf LFS_CFLAGS`"
+
+%check
+%if %{run_tests}
+ %__make check || exit 0
+%endif
+
+%install
+%make_install
+
+mkdir -p %{buildroot}/etc/bash_completion.d
+
+# make manpages for bash builtins as per suggestion in DOC/README
+pushd doc
+sed -e '
+/^\.SH NAME/, /\\- bash built-in commands, see \\fBbash\\fR(1)$/{
+/^\.SH NAME/d
+s/^bash, //
+s/\\- bash built-in commands, see \\fBbash\\fR(1)$//
+s/,//g
+b
+}
+d
+' builtins.1 > man.pages
+# '
+for i in echo pwd test kill; do
+ perl -pi -e "s,$i,,g" man.pages
+ perl -pi -e "s, , ,g" man.pages
+done
+
+install -c -m 644 builtins.1 %{buildroot}%{_mandir}/man1/builtins.1
+install -c -m 644 bash.1 %{buildroot}%{_mandir}/man1/bash.1
+
+for i in `cat man.pages` ; do
+ echo .so man1/builtins.1 > %{buildroot}%{_mandir}/man1/$i.1
+ chmod 0644 %{buildroot}%{_mandir}/man1/$i.1
+done
+popd
+
+# Link bash man page to sh so that man sh works.
+ln -s bash.1 %{buildroot}%{_mandir}/man1/sh.1
+
+# Not for printf, true and false (conflict with coreutils)
+rm -f %{buildroot}/%{_mandir}/man1/printf.1
+rm -f %{buildroot}/%{_mandir}/man1/true.1
+rm -f %{buildroot}/%{_mandir}/man1/false.1
+
+pushd %{buildroot}
+ln -sf bash ./usr/bin/sh
+rm -f .%{_infodir}/dir
+popd
+LONG_BIT=$(getconf LONG_BIT)
+mv %{buildroot}%{_bindir}/bashbug \
+ %{buildroot}%{_bindir}/bashbug-"${LONG_BIT}"
+
+rm -rf %{buildroot}%{_bindir}/bashbug-*
+chmod a-x doc/*.sh
+
+# remove duplicate manpages
+%fdupes -s %{buildroot}/%{_mandir}
+
+%remove_docs
+
+%post -p <lua>
+bashfound = false;
+shfound = false;
+
+f = io.open("/etc/shells", "r");
+if f == nil
+then
+ f = io.open("/etc/shells", "w");
+else
+ repeat
+ t = f:read();
+ if t == "/bin/bash"
+ then
+ bashfound = true;
+ end
+ if t == "/bin/sh"
+ then
+ shfound = true;
+ end
+ until t == nil;
+end
+f:close()
+
+f = io.open("/etc/shells", "a");
+if not bashfound
+then
+ f:write("/bin/bash\n")
+end
+if not shfound
+then
+ f:write("/bin/sh\n")
+end
+f:close()
+
+%postun
+if [ "$1" = 0 ]; then
+ /bin/grep -v '^/bin/bash$' < /etc/shells | \
+ /bin/grep -v '^/bin/sh$' > /etc/shells.new
+ /bin/mv /etc/shells.new /etc/shells
+fi
+
+
+
+%files
+%manifest %{name}.manifest
+%license COPYING
+%{_bindir}/sh
+%{_bindir}/bash
+%dir %{_sysconfdir}/bash_completion.d
+
+source ./test_config
${THIS_SH} ./alias.tests > /tmp/xx 2>&1
-diff /tmp/xx alias.right && rm -f /tmp/xx
+diff /tmp/xx alias.right ;result_check; rm -f /tmp/xx
export THIS_SH
${THIS_SH} ./version
+BASH_VER=`${THIS_SH} ./version | grep version | awk '{print $2}'`
+
+: ${TEST_LOG:=/tmp/bash_test}
+export TEST_LOG
+rm -f ${TEST_LOG}
rm -f /tmp/xx
+# Color
+Color_Off='\e[0m' # Text Reset
+
+# Regular Colors
+Red='\e[0;31m' # Red
+Green='\e[0;32m' # Green
+Cyan='\e[0;36m' # Cyank
+
+# Bold
+BWhite='\e[1;37m' # White
+
echo Any output from any test, unless otherwise noted, indicates a possible anomaly
for x in run-*
do
- case $x in
- $0|run-minimal|run-gprof) ;;
- *.orig|*~) ;;
- *) echo $x ; sh $x ;;
- esac
+ case $x in
+ $0|run-minimal|run-gprof) ;;
+ *.orig|*~) ;;
+ *)
+ echo -e "${BWhite}TEST${Color_Off}: $x" ;
+ sh $x
+ ;;
+ esac
done
+TOTAL_CNT=`grep "TEST:" ${TEST_LOG} | wc -l`
+PASS_CNT=`grep "PASS:" ${TEST_LOG} | wc -l`
+FAIL_CNT=`grep "FAIL:" ${TEST_LOG} | wc -l`
+SKIP_CNT=`grep "SKIP:" ${TEST_LOG} | wc -l`
+
+br='==================='; br=$br$br$br$br;
+
+echo -e "${Green}$br ${Color_Off}"
+echo -e "${Green}Test sheet summary for bash ${BASH_VER}${Color_Off}"
+echo -e "${Green}$br ${Color_Off}"
+echo -e "#${BWhite} TOTAL: $TOTAL_CNT ${Color_Off}"
+echo -e "#${Green} PASS${Color_Off} : $PASS_CNT"
+echo -e "#${Red} FAIL${Color_Off} : $FAIL_CNT"
+echo -e "#${Cyan} SKIP${Color_Off} : $SKIP_CNT"
+echo -e "${Green}$br ${Color_Off}"
+
exit 0
+source ./test_config
${THIS_SH} ./appendop.tests > /tmp/xx 2>&1
-diff /tmp/xx appendop.right && rm -f /tmp/xx
+diff /tmp/xx appendop.right ;result_check; rm -f /tmp/xx
+source ./test_config
${THIS_SH} ./arith.tests > /tmp/xx 2>&1
-diff /tmp/xx arith.right && rm -f /tmp/xx
+diff /tmp/xx arith.right ;result_check; rm -f /tmp/xx
+source ./test_config
${THIS_SH} ./arith-for.tests > /tmp/xx 2>&1
-diff /tmp/xx arith-for.right && rm -f /tmp/xx
+diff /tmp/xx arith-for.right ;result_check; rm -f /tmp/xx
+source ./test_config
echo "warning: all of these tests will fail if arrays have not" >&2
echo "warning: been compiled into the shell" >&2
${THIS_SH} ./array.tests > /tmp/xx 2>&1
-diff /tmp/xx array.right && rm -f /tmp/xx
+diff /tmp/xx array.right ;result_check; rm -f /tmp/xx
+source ./test_config
echo "warning: all of these tests will fail if arrays have not" >&2
echo "warning: been compiled into the shell" >&2
${THIS_SH} ./array-at-star > /tmp/xx 2>&1
-diff /tmp/xx array2.right && rm -f /tmp/xx
+diff /tmp/xx array2.right ;result_check; rm -f /tmp/xx
+source ./test_config
${THIS_SH} ./braces.tests > /tmp/xx
-diff /tmp/xx braces.right && rm -f /tmp/xx
+diff /tmp/xx braces.right ;result_check; rm -f /tmp/xx
+source ./test_config
+
+echo "warning: some of these tests may fail if process substitution has not" >&2
+skip_test
+exit 0
+
+echo "warning: some of these tests may fail if process substitution has not" >&2
+echo "warning: been compiled into the shell or if the OS does not provide" >&2
+echo "warning: /dev/fd." >&2
+
${THIS_SH} ./builtins.tests > /tmp/xx 2>&1
-diff /tmp/xx builtins.right && rm -f /tmp/xx
+diff /tmp/xx builtins.right ;result_check; rm -f /tmp/xx
+source ./test_config
echo "warning: all of these tests will fail if the conditional command has not" >&2
echo "warning: been compiled into the shell" >&2
echo "warning: some of these tests will fail if extended pattern matching has not" >&2
echo "warning: been compiled into the shell" >&2
${THIS_SH} ./cond.tests > /tmp/xx 2>&1
-diff /tmp/xx cond.right && rm -f /tmp/xx
+diff /tmp/xx cond.right ;result_check; rm -f /tmp/xx
+source ./test_config
${THIS_SH} ./cprint.tests > /tmp/xx 2>&1
-diff /tmp/xx cprint.right && rm -f /tmp/xx
+diff /tmp/xx cprint.right ;result_check; rm -f /tmp/xx
#!../bash
#$Id: run-dbg-support,v 1.5 2002/11/14 06:08:16 rockyb Exp $
-
+source ./test_config
TEST_NAME='dbg-support'
TEST_FILE="/tmp/${TEST_NAME}.check"
${THIS_SH} ./${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null
set -f
-diff $TEST_FILE ${TEST_NAME}.right && rm -f $TEST_FILE
+diff $TEST_FILE ${TEST_NAME}.right ;result_check; rm -f $TEST_FILE
# Return code tells testing mechanism whether passed or not.
exit $?
#!../bash
#$Id: run-dbg-support2,v 1.3 2002/11/14 06:08:16 rockyb Exp $
+source ./test_config
TEST_NAME='dbg-support2'
TEST_FILE="/tmp/${TEST_NAME}.check"
${THIS_SH} ./${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null
set -f
-diff $TEST_FILE ${TEST_NAME}.right && rm -f $TEST_FILE
+diff $TEST_FILE ${TEST_NAME}.right ;result_check; rm -f $TEST_FILE
# Return code tells testing mechanism whether passed or not.
exit $?
+source ./test_config
${THIS_SH} ./dstack.tests > /tmp/xx 2>&1
-diff /tmp/xx dstack.right && rm -f /tmp/xx
+diff /tmp/xx dstack.right ;result_check; rm -f /tmp/xx
${THIS_SH} ./dstack2.tests > /tmp/xx 2>&1
-diff /tmp/xx dstack2.right && rm -f /tmp/xx
+diff /tmp/xx dstack2.right ;result_check; rm -f /tmp/xx
+source ./test_config
${THIS_SH} ./dollar-at-star > /tmp/xx 2>&1
-diff /tmp/xx dollar.right && rm -f /tmp/xx
+diff /tmp/xx dollar.right ;result_check; rm -f /tmp/xx
+source ./test_config
${THIS_SH} ./errors.tests > /tmp/xx 2>&1
-diff /tmp/xx errors.right && rm -f /tmp/xx
+diff /tmp/xx errors.right ;result_check; rm -f /tmp/xx
+source ./test_config
echo "warning: the text of a system error message may vary between systems and" >&2
echo "warning: produce diff output." >&2
echo "warning: if the text of the error messages concerning \`notthere' or" >&2
echo "warning: if diff output differing only in the location of the bash" >&2
echo "warning: binary appears, please do not consider this a test failure" >&2
${THIS_SH} ./execscript > /tmp/xx 2>&1
-diff /tmp/xx exec.right && rm -f /tmp/xx
+diff /tmp/xx exec.right ;result_check; rm -f /tmp/xx
+source ./test_config
${THIS_SH} ./exp-tests | grep -v '^expect' > /tmp/xx
-diff /tmp/xx exp.right && rm -f /tmp/xx
+diff /tmp/xx exp.right ;result_check; rm -f /tmp/xx
PATH=$PATH:`pwd`
export PATH
+source ./test_config
${THIS_SH} ./extglob.tests | grep -v '^expect' > /tmp/xx
-diff /tmp/xx extglob.right && rm -f /tmp/xx
+diff /tmp/xx extglob.right ;result_check; rm -f /tmp/xx
PATH=$PATH:`pwd`
export PATH
+source ./test_config
${THIS_SH} ./extglob2.tests | grep -v '^expect' > /tmp/xx
-diff /tmp/xx extglob2.right && rm -f /tmp/xx
+diff /tmp/xx extglob2.right ;result_check; rm -f /tmp/xx
PATH=$PATH:`pwd`
export PATH
+source ./test_config
${THIS_SH} ./extglob3.tests > /tmp/xx
-diff /tmp/xx extglob3.right && rm -f /tmp/xx
+diff /tmp/xx extglob3.right ;result_check; rm -f /tmp/xx
echo "warning: if you have exported functions defined in your environment," >&2
echo "warning: they may show up as diff output." >&2
echo "warning: if so, please do not consider this a test failure" >&2
+source ./test_config
${THIS_SH} ./func.tests > /tmp/xx 2>&1
-diff /tmp/xx func.right && rm -f /tmp/xx
+diff /tmp/xx func.right ;result_check; rm -f /tmp/xx
+source ./test_config
${THIS_SH} ./getopts.tests > /tmp/xx 2>&1
-diff /tmp/xx getopts.right && rm -f /tmp/xx
+diff /tmp/xx getopts.right ;result_check; rm -f /tmp/xx
PATH=$PATH:`pwd`
export PATH
+source ./test_config
${THIS_SH} ./glob-test 2>&1 | grep -v '^expect' > /tmp/xx
-diff /tmp/xx glob.right && rm -f /tmp/xx
+diff /tmp/xx glob.right ;result_check; rm -f /tmp/xx
+source ./test_config
${THIS_SH} ./heredoc.tests > /tmp/xx 2>&1
-diff /tmp/xx heredoc.right && rm -f /tmp/xx
+diff /tmp/xx heredoc.right ;result_check; rm -f /tmp/xx
+source ./test_config
${THIS_SH} ./herestr.tests > /tmp/xx 2>&1
-diff /tmp/xx herestr.right && rm -f /tmp/xx
+diff /tmp/xx herestr.right ;result_check; rm -f /tmp/xx
echo "warning: all of these tests will fail if history has not been compiled" >&2
echo "warning: into the shell" >&2
+source ./test_config
${THIS_SH} ./histexp.tests > /tmp/xx 2>&1
-diff /tmp/xx histexp.right && rm -f /tmp/xx
+diff /tmp/xx histexp.right ;result_check; rm -f /tmp/xx
echo "warning: all of these tests will fail if history has not been compiled" >&2
echo "warning: into the shell" >&2
+source ./test_config
${THIS_SH} ./history.tests > /tmp/xx 2>&1
-diff /tmp/xx history.right && rm -f /tmp/xx
+diff /tmp/xx history.right ;result_check; rm -f /tmp/xx
+source ./test_config
${THIS_SH} ./ifs.tests > /tmp/xx 2>&1
-diff /tmp/xx ifs.right && rm -f /tmp/xx
+diff /tmp/xx ifs.right ;result_check; rm -f /tmp/xx
+source ./test_config
${THIS_SH} ./ifs-posix.tests > /tmp/xx 2>&1
-diff /tmp/xx ifs-posix.right && rm -f /tmp/xx
+diff /tmp/xx ifs-posix.right ;result_check; rm -f /tmp/xx
+source ./test_config
${THIS_SH} < ./input-line.sh > /tmp/xx
-diff /tmp/xx input.right && rm -f /tmp/xx
+diff /tmp/xx input.right ;result_check; rm -f /tmp/xx
# See whether or not we can use `diff -a'
( diff -a ./intl.right ./intl.right >/dev/null 2>&1 ) && AFLAG=-a
+source ./test_config
+echo "warning: some of these tests will fail if you do not have UTF-8" >&2
+skip_test
+exit 0
+
echo "warning: some of these tests will fail if you do not have UTF-8" >&2
echo "warning: locales installed on your system." >&2
echo "warning: please ignore any differences consisting only of white space" >&2
${THIS_SH} ./intl.tests > /tmp/xx
-diff $AFLAG /tmp/xx intl.right && rm -f /tmp/xx
+diff $AFLAG /tmp/xx intl.right ;result_check; rm -f /tmp/xx
-${THIS_SH} ./invert.tests | grep -v '^expect' > /tmp/xx
-diff /tmp/xx invert.right && rm -f /tmp/xx
+source ./test_config
+${THIS_SH} ./invert.tests 2>&1 | grep -v '^expect' > /tmp/xx
+diff /tmp/xx invert.right ;result_check; rm -f /tmp/xx
+source ./test_config
${THIS_SH} ./iquote.tests >/tmp/xx 2>&1
-diff /tmp/xx iquote.right && rm -f /tmp/xx
+diff /tmp/xx iquote.right ;result_check; rm -f /tmp/xx
echo "warning: into the shell" >&2
echo "warning: there may be a message regarding a cat process dying due to a" >&2
echo "warning: SIGHUP. Please disregard." >&2
-
+source ./test_config
${THIS_SH} ./jobs.tests > /tmp/xx 2>&1
-diff /tmp/xx jobs.right && rm -f /tmp/xx
+diff /tmp/xx jobs.right ;result_check; rm -f /tmp/xx
+source ./test_config
${THIS_SH} ./more-exp.tests 2>&1 | grep -v '^expect' > /tmp/xx
-diff /tmp/xx more-exp.right && rm -f /tmp/xx
+diff /tmp/xx more-exp.right ;result_check; rm -f /tmp/xx
echo "warning: diff output may be generated. If so, please do not consider" >&2
echo "warning: this a test failure" >&2
+source ./test_config
${THIS_SH} ./new-exp.tests 2>&1 | grep -v '^expect' > /tmp/xx
-diff /tmp/xx new-exp.right && rm -f /tmp/xx
+diff /tmp/xx new-exp.right ;result_check; rm -f /tmp/xx
+source ./test_config
${THIS_SH} ./nquote.tests 2>&1 | grep -v '^expect' > /tmp/xx
-diff /tmp/xx nquote.right && rm -f /tmp/xx
+diff /tmp/xx nquote.right ;result_check; rm -f /tmp/xx
echo "warning: several of these tests will fail if arrays have not" >&2
echo "warning: been compiled into the shell." >&2
+
+source ./test_config
${THIS_SH} ./nquote1.tests 2>&1 | grep -v '^expect' > /tmp/xx
-diff /tmp/xx nquote1.right && rm -f /tmp/xx
+diff /tmp/xx nquote1.right ;result_check; rm -f /tmp/xx
echo "warning: several of these tests will fail if arrays have not" >&2
echo "warning: been compiled into the shell." >&2
+
+source ./test_config
${THIS_SH} ./nquote2.tests 2>&1 | grep -v '^expect' > /tmp/xx
-diff /tmp/xx nquote2.right && rm -f /tmp/xx
+diff /tmp/xx nquote2.right ;result_check; rm -f /tmp/xx
echo "warning: several of these tests will fail if arrays have not" >&2
echo "warning: been compiled into the shell." >&2
+
+source ./test_config
${THIS_SH} ./nquote3.tests 2>&1 | grep -v '^expect' > /tmp/xx
-diff /tmp/xx nquote3.right && rm -f /tmp/xx
+diff /tmp/xx nquote3.right ;result_check; rm -f /tmp/xx
echo warning: some of these tests will fail if you do not have UTF-8 >&2
-echo warning: locales installed on your system
+echo warning: locales installed on your system >&2
+
+source ./test_config
${THIS_SH} ./nquote4.tests 2>&1 | grep -v '^expect' > /tmp/xx
-diff /tmp/xx nquote4.right && rm -f /tmp/xx
+diff /tmp/xx nquote4.right ;result_check; rm -f /tmp/xx
+source ./test_config
${THIS_SH} ./posix2.tests 2>&1 | grep -v '^expect' > /tmp/xx
-diff /tmp/xx posix2.right && rm -f /tmp/xx
+diff /tmp/xx posix2.right ;result_check; rm -f /tmp/xx
+source ./test_config
${THIS_SH} ./posixpat.tests > /tmp/xx
-diff /tmp/xx posixpat.right && rm -f /tmp/xx
+diff /tmp/xx posixpat.right ;result_check; rm -f /tmp/xx
+source ./test_config
${THIS_SH} ./precedence > /tmp/xx
-diff /tmp/xx prec.right && rm -f /tmp/xx
+diff /tmp/xx prec.right ;result_check; rm -f /tmp/xx
# See whether or not we can use `diff -a'
( diff -a ./printf.tests ./printf.tests >/dev/null 2>&1 ) && AFLAG=-a
+source ./test_config
${THIS_SH} ./printf.tests > /tmp/xx 2>&1
-diff $AFLAG /tmp/xx printf.right && rm -f /tmp/xx
+diff $AFLAG /tmp/xx printf.right ;result_check; rm -f /tmp/xx
+source ./test_config
${THIS_SH} ./quote.tests >/tmp/xx 2>&1
-diff /tmp/xx quote.right && rm -f /tmp/xx
+diff /tmp/xx quote.right ;result_check; rm -f /tmp/xx
+
+source ./test_config
echo "warning: please do not consider output differing only in the amount of" >&2
echo "warning: white space to be an error." >&2
+skip_test
+exit 0
+
+
+echo "warning: please do not consider output differing only in the amount of" >&2
+echo "warning: white space to be an error." >&2
+
${THIS_SH} ./read.tests > /tmp/xx 2>&1
-diff /tmp/xx read.right && rm -f /tmp/xx
+diff /tmp/xx read.right ;result_check; rm -f /tmp/xx
echo "warning: if the text of an error message concerning \`redir1.*' not being" >&2
echo "warning: found or messages concerning bad file descriptors produce diff" >&2
echo "warning: output, please do not consider it a test failure" >&2
+
+source ./test_config
${THIS_SH} ./redir.tests > /tmp/xx 2>&1
-diff /tmp/xx redir.right && rm -f /tmp/xx
+diff /tmp/xx redir.right ;result_check; rm -f /tmp/xx
+source ./test_config
${THIS_SH} ./rhs-exp.tests 2>&1 > /tmp/xx
-diff /tmp/xx rhs-exp.right && rm -f /tmp/xx
+diff /tmp/xx rhs-exp.right ;result_check; rm -f /tmp/xx
+source ./test_config
${THIS_SH} ./rsh.tests > /tmp/xx 2>&1
-diff /tmp/xx rsh.right && rm -f /tmp/xx
+diff /tmp/xx rsh.right ;result_check; rm -f /tmp/xx
+source ./test_config
${THIS_SH} ./set-e-test > /tmp/xx
-diff /tmp/xx set-e.right && rm -f /tmp/xx
+diff /tmp/xx set-e.right ;result_check; rm -f /tmp/xx
#!../bash
#$Id: run-set-x,v 1.1 2002/12/09 13:12:37 rockyb Exp $
+source ./test_config
TEST_NAME='set-x'
TEST_FILE="/tmp/${TEST_NAME}.check"
${THIS_SH} ./${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null
set -f
-diff $TEST_FILE ${TEST_NAME}.right && rm -f $TEST_FILE
+diff $TEST_FILE ${TEST_NAME}.right ;result_check; rm -f $TEST_FILE
# Return code tells testing mechanism whether passed or not.
exit $?
+source ./test_config
${THIS_SH} ./shopt.tests > /tmp/xx 2>&1
-diff /tmp/xx shopt.right && rm -f /tmp/xx
+diff /tmp/xx shopt.right ;result_check; rm -f /tmp/xx
+source ./test_config
${THIS_SH} ./strip.tests > /tmp/xx
-diff /tmp/xx strip.right && rm -f /tmp/xx
+diff /tmp/xx strip.right ;result_check; rm -f /tmp/xx
unset GROUPS UID 2>/dev/null
+source ./test_config
${THIS_SH} ./test.tests >/tmp/xx 2>&1
-diff /tmp/xx test.right && rm -f /tmp/xx
+diff /tmp/xx test.right ;result_check; rm -f /tmp/xx
+source ./test_config
${THIS_SH} ./tilde.tests > /tmp/xx
-diff /tmp/xx tilde.right && rm -f /tmp/xx
+diff /tmp/xx tilde.right ;result_check; rm -f /tmp/xx
+source ./test_config
${THIS_SH} ./tilde2.tests > /tmp/xx
-diff /tmp/xx tilde2.right && rm -f /tmp/xx
+diff /tmp/xx tilde2.right ;result_check; rm -f /tmp/xx
+ource ./test_config
+echo "warning: UNIX versions number signals differently. If output differing" >&2
+echo "warning: only in line numbers is produced, please do not consider this" >&2
+echo "warning: a test failure." >&2
+skip_test
+exit 0
+
echo "warning: UNIX versions number signals differently. If output differing" >&2
echo "warning: only in line numbers is produced, please do not consider this" >&2
echo "warning: a test failure." >&2
${THIS_SH} ./trap.tests > /tmp/xx 2>&1
-diff /tmp/xx trap.right && rm -f /tmp/xx
+diff /tmp/xx trap.right ;result_check; rm -f /tmp/xx
+source ./test_config
${THIS_SH} ./type.tests > /tmp/xx 2>&1
-diff /tmp/xx type.right && rm -f /tmp/xx
+diff /tmp/xx type.right ;result_check; rm -f /tmp/xx
+source ./test_config
${THIS_SH} ./varenv.sh | grep -v '^expect' > /tmp/xx
-diff /tmp/xx varenv.right && rm -f /tmp/xx
+diff /tmp/xx varenv.right ;result_check; rm -f /tmp/xx
shopt -u checkhash
shopt -u checkwinsize
shopt -s cmdhist
-shopt -u compat31
shopt -u dotglob
shopt -u execfail
shopt -s expand_aliases
shopt -u cdable_vars
shopt -u checkhash
shopt -u checkwinsize
-shopt -u compat31
shopt -u dotglob
shopt -u execfail
shopt -u extdebug
cdable_vars off
checkhash off
checkwinsize off
-compat31 off
dotglob off
execfail off
extdebug off
--- /dev/null
+# Color
+Color_Off='\e[0m' # Text Reset
+
+# Regular Colors
+Red='\e[0;31m' # Red
+Green='\e[0;32m' # Green
+Cyan='\e[0;36m' # Cyan
+
+result_check() {
+if [ $? -eq 0 ]
+then
+ echo -e "${Green}PASS${Color_Off}: $(basename $0)"
+ echo "TEST: PASS: $(basename $0)" >> ${TEST_LOG}
+else
+ echo -e "${Red}FAIL${Color_Off}: $(basename $0)"
+ echo -e "TEST: FAIL: $(basename $0)" >> ${TEST_LOG}
+fi
+}
+
+skip_test() {
+ echo -e "${Cyan}SKIP${Color_Off}: $(basename $0)"
+ echo "TEST: SKIP: $(basename $0)" >> ${TEST_LOG}
+}