#!/bin/sh # This software is part of the SBCL system. See the README file for # more information. # # While most of SBCL is derived from the CMU CL system, the test # files (like this one) were written from scratch after the fork # from CMU CL. # # This software is in the public domain and is provided with # absolutely no warranty. See the COPYING and CREDITS files for # more information. . ./expect.sh use_test_subdirectory # It's unclear why the majority of these tests are written in shell script when # many look as though they would be perfectly happy as lisp tests. # This test, on the other hand, would have a tough time as a lisp test, # because it needs to make a symlink which would either mean calling run-program # or using alien-funcall on symlink(). Shell is easier. mkdir -p inscrutable/f00 echo '(defun zook (x) (declare (integer x)) (length x))' > inscrutable/f00/f00_xyz_bad ln -s inscrutable/f00/f00_xyz_bad good.lisp run_sbcl --eval '(setq *default-pathname-defaults* #P"")' \ --eval '(compile-file "good.lisp" :verbose t)' --quit >stdout.out 2>stderr.out egrep -q 'compiling file ".*good' stdout.out stdout_ok=$? egrep -q 'file:.+good' stderr.out stderr_ok=$? if [ $stdout_ok = 0 -a $stderr_ok = 0 ] ; then rm -r good.* stdout.out stderr.out inscrutable echo "untruenames: PASS" else cat stdout.out stderr.out echo "untruenames: FAIL" exit $EXIT_LOSE fi ## FIXME: all these tests need to be more silent. Too much noise to parse tmpfilename="$TEST_FILESTEM.lisp" # This should fail, as type inference should show that the call to FOO # will return something of the wrong type. cat > $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < y 1) (funcall (if (> y 0) #'foo #'identity) y)))) EOF expect_clean_compile $tmpfilename # This shouldn't fail despite the apparent type mismatch, because of # the NOTINLINE declaration. cat > $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename < $tmpfilename <