From 39f78131e25235767db525148430ba7891ebc3f0 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 27 May 1998 12:36:38 +0000 Subject: . --- tests/ls/cr-1 | 52 ---------------------------------------------------- tests/ls/rt-1 | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 52 deletions(-) delete mode 100755 tests/ls/cr-1 create mode 100755 tests/ls/rt-1 (limited to 'tests/ls') diff --git a/tests/ls/cr-1 b/tests/ls/cr-1 deleted file mode 100755 index fc91655cd..000000000 --- a/tests/ls/cr-1 +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -# Make sure name is used as secondary key when sorting on mtime or ctime. - -: ${LS=ls} -: ${TOUCH=touch} - -if test "$VERBOSE" = yes; then - set -x - $LS --version -fi - -tmp=t-ls.$$ - -# We're going to run LS from a subdir. -# Prepend ../ if $LS is a relative file name. -case $LS in - /*) ;; - */*) LS=../$LS -esac - -case $TOUCH in - /*) ;; - */*) TOUCH=../$TOUCH -esac - -test_failure=0 -mkdir $tmp || test_failure=1 -cd $tmp || test_failure=1 - -date=1998-01-15 - -$TOUCH -d "$date" c || test_failure=1 -$TOUCH -d "$date" a || test_failure=1 -$TOUCH -d "$date" b || test_failure=1 - -if test $test_failure = 1; then - echo 'failure in testing framework' - exit 1 -fi - -fail=0 - -set `$LS -t a b c` -test "$*" = 'a b c' && : || fail=1 - -set `$LS -rt a b c` -test "$*" = 'c b a' && : || fail=1 - -cd .. -rm -rf $tmp - -exit $fail diff --git a/tests/ls/rt-1 b/tests/ls/rt-1 new file mode 100755 index 000000000..fc91655cd --- /dev/null +++ b/tests/ls/rt-1 @@ -0,0 +1,52 @@ +#!/bin/sh +# Make sure name is used as secondary key when sorting on mtime or ctime. + +: ${LS=ls} +: ${TOUCH=touch} + +if test "$VERBOSE" = yes; then + set -x + $LS --version +fi + +tmp=t-ls.$$ + +# We're going to run LS from a subdir. +# Prepend ../ if $LS is a relative file name. +case $LS in + /*) ;; + */*) LS=../$LS +esac + +case $TOUCH in + /*) ;; + */*) TOUCH=../$TOUCH +esac + +test_failure=0 +mkdir $tmp || test_failure=1 +cd $tmp || test_failure=1 + +date=1998-01-15 + +$TOUCH -d "$date" c || test_failure=1 +$TOUCH -d "$date" a || test_failure=1 +$TOUCH -d "$date" b || test_failure=1 + +if test $test_failure = 1; then + echo 'failure in testing framework' + exit 1 +fi + +fail=0 + +set `$LS -t a b c` +test "$*" = 'a b c' && : || fail=1 + +set `$LS -rt a b c` +test "$*" = 'c b a' && : || fail=1 + +cd .. +rm -rf $tmp + +exit $fail -- cgit v1.2.3-54-g00ecf