svn commit: trunk/busybox/testsuite

Bernhard Fischer rep.nop at aon.at
Fri May 5 21:44:40 UTC 2006


On Fri, May 05, 2006 at 02:07:44PM -0700, landley at busybox.net wrote:
>Author: landley
>Date: 2006-05-05 14:07:41 -0700 (Fri, 05 May 2006)
>New Revision: 15015
>
>Log:
>New test from Natanael Copa.
>
>
>Added:
>   trunk/busybox/testsuite/readlink.tests
>
>
>Changeset:
>Added: trunk/busybox/testsuite/readlink.tests
>===================================================================
>--- trunk/busybox/testsuite/readlink.tests	2006-05-05 20:33:07 UTC (rev 15014)
>+++ trunk/busybox/testsuite/readlink.tests	2006-05-05 21:07:41 UTC (rev 15015)
>@@ -0,0 +1,29 @@
>+#!/bin/sh
>+
>+# Readlink tests.
>+# Copyright 2006 by Natanael Copa <n at tanael.org>
>+# Licensed under GPL v2, see file LICENSE for details.
>+
>+. testing.sh
>+
>+TESTDIR=readlink_testdir
>+TESTFILE="$TESTDIR/testfile"
>+TESTLINK="testlink"
>+FAILLINK="$TESTDIR/$TESTDIR/testlink"
>+
>+# create the dir and test files
>+mkdir -p "./$TESTDIR"
>+touch "./$TESTFILE"
>+ln -s "./$TESTFILE" "./$TESTLINK"
>+
>+testing "readlink on a file" "readlink ./$TESTFILE" "" "" ""
>+testing "readlink on a link" "readlink ./$TESTLINK" "./$TESTFILE\n" "" ""

This readlink.tests isn't executable.. Should we
PATH="$LINKSDIR":$srcdir:$bindir:$PATH \
	$SHELL "${srcdir:-.}/$applet".tests

or rely on the .tests to be +x ?

Also there is this line missing here:

optional FEATURE_READLINK_FOLLOW
>+testing "readlink -f on a file" "readlink -f ./$TESTFILE" "$PWD/$TESTFILE\n" "" ""
>+testing "readlink -f on a link" "readlink -f ./$TESTLINK" "$PWD/$TESTFILE\n" "" ""
>+testing "readlink -f on an invalid link" "readlink -f ./$FAILLINK" "" "" ""
>+testing "readlink -f on a wierd dir" "readlink -f $TESTDIR/../$TESTFILE" "$PWD/$TESTFILE\n" "" ""
>+
>+
>+# clean up
>+rm -r "$TESTLINK" "$TESTDIR" 
>+



More information about the busybox mailing list