mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-10 07:26:40 -04:00
Fix stdstream initialization
Extract the keyword from the DEFAULT-EXTERNAL-FORMAT specification, in case users have specified options in *DEFAULT-EXTERNAL-FORMAT*.
This commit is contained in:
parent
968fc691b3
commit
099944850d
|
|
@ -2678,7 +2678,7 @@ benefit of the function GET-OUTPUT-STREAM-STRING."
|
||||||
((sb-win32::console-handle-p fd)
|
((sb-win32::console-handle-p fd)
|
||||||
:ucs-2)
|
:ucs-2)
|
||||||
(t
|
(t
|
||||||
(default-external-format))))
|
(external-format-keyword (default-external-format)))))
|
||||||
(ef (get-external-format keyword))
|
(ef (get-external-format keyword))
|
||||||
(replacement (ef-default-replacement-character ef)))
|
(replacement (ef-default-replacement-character ef)))
|
||||||
`(,keyword :replacement ,replacement)))
|
`(,keyword :replacement ,replacement)))
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@
|
||||||
use_test_subdirectory
|
use_test_subdirectory
|
||||||
|
|
||||||
tmpfilename="$TEST_FILESTEM.lisp"
|
tmpfilename="$TEST_FILESTEM.lisp"
|
||||||
|
tmpcore="stream-test.core"
|
||||||
|
|
||||||
cat > $tmpfilename <<EOF
|
cat > $tmpfilename <<EOF
|
||||||
(in-package :cl-user)
|
(in-package :cl-user)
|
||||||
|
|
@ -63,5 +64,18 @@ if [ 'Bivalent *ERROR-OUTPUT*' != "$test_output" ]; then
|
||||||
exit $EXIT_LOSE
|
exit $EXIT_LOSE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
run_sbcl <<EOF
|
||||||
|
(setf sb-ext:*default-external-format* '(:utf-8 :newline :crlf))
|
||||||
|
(sb-ext:save-lisp-and-die "$tmpcore")
|
||||||
|
EOF
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "failure saving core"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
run_sbcl_with_core "$tmpcore" --disable-ldb --noinform --no-sysinit --no-userinit --disable-debugger \
|
||||||
|
--eval '(sb-ext:quit :unix-status 52)'
|
||||||
|
check_status_maybe_lose "stdstream external format setting" $? 52 "(loading worked)"
|
||||||
|
|
||||||
# success
|
# success
|
||||||
exit $EXIT_TEST_WIN
|
exit $EXIT_TEST_WIN
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue