diff options
author | Jim Meyering <jim@meyering.net> | 2001-11-01 10:56:41 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2001-11-01 10:56:41 +0000 |
commit | c1c9a579e3d1b311650d989dcc95f7ed1e655ad4 (patch) | |
tree | 2ddeaed14f138b8fa199e80322ea8c76f798a214 /tests | |
parent | e3f8ccf486af32cd937398b8493b67fff35f7a45 (diff) | |
download | coreutils-c1c9a579e3d1b311650d989dcc95f7ed1e655ad4.tar.xz |
*** empty log message ***
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/ls/dired | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/ls/dired b/tests/ls/dired new file mode 100755 index 000000000..b00f7cf08 --- /dev/null +++ b/tests/ls/dired @@ -0,0 +1,39 @@ +#!/bin/sh +# make sure --dired option works + +if test "$VERBOSE" = yes; then + set -x + ls --version +fi + +. $srcdir/../envvar-check + +pwd=`pwd` +tmp=dired.$$ +trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap '(exit $?); exit' 1 2 13 15 + +framework_failure=0 +mkdir $tmp || framework_failure=1 +cd $tmp || framework_failure=1 +mkdir dir || framework_failure=1 + +if test $framework_failure = 1; then + echo 'failure in testing framework' 1>&2 + (exit 1); exit +fi + +fail=0 + +ls -lR --dired dir > out || fail=1 +cat <<EOF > exp + dir: + total 0 +//SUBDIRED// 2 5 +//DIRED-OPTIONS// --quoting-style=literal +EOF + +cmp out exp || fail=1 +test $fail = 1 && diff out exp 2> /dev/null + +(exit $fail); exit |