From: Karel Zak Date: Tue, 6 Mar 2007 12:04:25 +0000 (+0100) Subject: tests: add look test for words with separator X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a17bead499741b5a3844f0d7a9bc82ad1788ba99;p=util-linux tests: add look test for words with separator $ look apple-pie Signed-off-by: Karel Zak --- diff --git a/tests/Makefile.am b/tests/Makefile.am index e448994e..02f47e8b 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -15,7 +15,8 @@ EXTRA_DIST = expected/* \ ts-mkswap-doit \ ts-mount-paths \ ts-namei-logic \ - ts-cramfs-mkfs + ts-cramfs-mkfs \ + ts-look-separator distclean-local: rm -rf output diff diff --git a/tests/commands.sh.in b/tests/commands.sh.in index 435446b3..de329032 100644 --- a/tests/commands.sh.in +++ b/tests/commands.sh.in @@ -19,5 +19,5 @@ TS_CMD_IPCS=${TS_CMD_IPCS:-"$TOPDIR/sys-utils/ipcs"} TS_CMD_COL=${TS_CMD_COL:-"$TOPDIR/text-utils/col"} TS_CMD_NAMEI=${TS_CMD_NAMEI-"$TOPDIR/misc-utils/namei"} - +TS_CMD_LOOK=${TS_CMD_LOOK-"$TOPDIR/misc-utils/look"} diff --git a/tests/expected/ts-look-separator b/tests/expected/ts-look-separator new file mode 100644 index 00000000..e69de29b diff --git a/tests/ts-look-separator b/tests/ts-look-separator new file mode 100755 index 00000000..d86e7077 --- /dev/null +++ b/tests/ts-look-separator @@ -0,0 +1,32 @@ +#!/bin/bash + +# +# WARNING: the look command expects that the /usr/share/dict/words uses +# directory order! +# +# for example: +# +# cat words.raw | egrep --invert-match "'s$" | \ +# egrep "^[[:alnum:]'&!,./-]+$" | \ +# sort --ignore-case --dictionary-order | \ +# uniq > words +# + +. commands.sh +. functions.sh + +TS_COMPONENT="look" +TS_DESC="separator" + +ts_init + +if [ ! -f "/usr/share/dict/words" ]; then + ts_ignore "/usr/share/dict/words not such file" +fi + +touch $TS_OUTPUT + +$TS_CMD_LOOK apple-pie >> $TS_OUTPUT + +ts_finalize +