[BACK]Return to test06 CVS log [TXT][DIR] Up to [cvs] / v6shell / tests

File: [cvs] / v6shell / tests / test06 (download)

Revision 1.4, Sat Dec 15 21:01:08 2018 UTC (2 months, 1 week ago) by jneitzel
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +2 -2 lines

Update tests/* (- tests/*.log); 'io' to 'nl' changes...; that's all

: etsh - " Force sh(1), csh(1), and other shells to exit w/ error! " <'' ;;;
:
: "  The author of this file, J.A. Neitzel <jan (at) etsh (dot) nl>,  "
: "  hereby grants it to the public domain.                           "
:
: "  From:  https://etsh.nl/tests  "
:

:
: test06 - Aliases
:

if $# = # if { fd2 -e echo Invalid shell - etsh\(1\) required } \
	if { exit } if A = B

echo Begin ...
alias
if $? = 1 echo 0 Aliases Set
alias	tests		"echo test??^tr ' ' '\n';:"
alias	logs		"echo *.log^tr ' ' '\n';:"
alias	TestCounts	"echo Test*Count^tr ' ' '\n';:"
alias	HelloWorld	"echo 'Hello World!'^cat^cat^cat^cat^cat^cat^cat^cat^cat^grep '^H';:"
alias	All		"echo *^tr ' ' '\n';:"
( alias ) >/dev/null
if $? = 1 if { fd2 -e echo Unexpected alias result } if { exit } if A = B
( alias ) ^ wc -l ^ tr -d ' \t\n' ; echo ' Aliases Set'
( alias ) ^ awk '{ print NR "\t" $0 }'
echo HelloWorld ...;HelloWorld^awk '{ print NR "\t" $0 }';echo HelloWorld .
echo All ...;       All                                  ;echo All .
echo tests ...;     tests     ^awk '{ print NR "\t" $0 }';echo tests .
echo logs ...;      logs      ^awk '{ print NR "\t" $0 }';echo logs .
echo TestCounts ...;TestCounts^awk '{ print NR "\t" $0 }';echo TestCounts .
unalias	tests
unalias	logs
unalias	TestCounts
unalias	HelloWorld
unalias	All
alias
if $? = 1 echo 0 Aliases Set
echo End .