3 # This software is part of the SBCL system. See the README file for
6 # While most of SBCL is derived from the CMU CL system, the test
7 # files (like this one) were written from scratch after the fork
10 # This software is in the public domain and is provided with
11 # absolutely no warranty. See the COPYING and CREDITS files for
14 # Test DIRECTORY and TRUENAME.
15 testdir=`pwd`"/filesys-test-$$"
17 echo this is a test > $testdir/test-1.tmp
18 echo this is a test > $testdir/test-2.tmp
20 ln -s test-1.tmp link-1
21 ln -s `pwd`/test-2.tmp link-2
22 ln -s i-do-not-exist link-3
25 ln -s `pwd`/link-6 link-5
27 "'(#p\"$testdir/link-3\"\
28 #p\"$testdir/link-4\"\
29 #p\"$testdir/link-5\"\
30 #p\"$testdir/link-6\"\
31 #p\"$testdir/test-1.tmp\"\
32 #p\"$testdir/test-2.tmp\")"
35 (let* ((directory (directory "./*"))
36 (truenames (sort directory #'string< :key #'pathname-name)))
37 (format t "~&TRUENAMES=~S~%" truenames)
39 (assert (equal truenames $expected_truenames)))
40 (assert (equal (truename "test-1.tmp") #p"$testdir/test-1.tmp"))
41 (assert (equal (truename "link-1") #p"$testdir/test-1.tmp"))
42 (assert (equal (truename "link-2") #p"$testdir/test-2.tmp"))
43 (assert (equal (truename "link-3") #p"$testdir/link-3"))
44 (assert (equal (truename "link-4") #p"$testdir/link-4"))
45 (assert (equal (truename "link-5") #p"$testdir/link-5"))
46 (assert (equal (truename "link-6") #p"$testdir/link-6"))
47 (sb-ext:quit :unix-status 52)
50 echo DIRECTORY/TRUENAME test part 1 failed, unexpected SBCL return code=$?
56 (let* ((directory (directory "$testdir/*"))
57 (truenames (sort directory #'string< :key #'pathname-name)))
58 (format t "~&TRUENAMES=~S~%" truenames)
60 (assert (equal truenames $expected_truenames)))
61 (assert (equal (truename "$testdir/test-1.tmp") #p"$testdir/test-1.tmp"))
62 (assert (equal (truename "$testdir/link-1") #p"$testdir/test-1.tmp"))
63 (assert (equal (truename "$testdir/link-2") #p"$testdir/test-2.tmp"))
64 (assert (equal (truename "$testdir/link-3") #p"$testdir/link-3"))
65 (assert (equal (truename "$testdir/link-4") #p"$testdir/link-4"))
66 (assert (equal (truename "$testdir/link-5") #p"$testdir/link-5"))
67 (assert (equal (truename "$testdir/link-6") #p"$testdir/link-6"))
68 (sb-ext:quit :unix-status 52)
71 echo DIRECTORY/TRUENAME test part 2 failed, unexpected SBCL return code=$?
76 # success convention for script