Closed phoe closed 1 year ago
I don't understand, symbol-name is not subject to *print-case*
.
But package name is.
* (dolist (c '(:downcase :upcase :capitalize)) (let ((*print-case* c)) (print 'sb-ext:%break)))
sb-int:%break
SB-INT:%BREAK
Sb-Int:%Break
Huh? No it's not. That test case doesn't really say anything. Try this instead:
(dolist (c '(:downcase :upcase :capitalize)) (let ((*print-case* c)) (print (package-name (symbol-package 'foo)))))
The package is still always uppercase, just like the symbol name.
package-name
is a string, so obviously it is not affected by *print-case*
. However, the plain
report prints test names in a symbol-like way, with the package name and a quad-colon qualifier followed by the test name. For some reason, the test name is affected by the current print case, while the package name is not; that is inconsistent with printing actual symbol names, where the package name is affected by the current print case.
Okey, so, the printing of test results is handled in report.lisp:274. The reason it doesn't use symbol-name
there is because test names can also be strings. The confusion arises because what's being printed is not an actual symbol, but rather the test's home package followed by the name, which is a string-designator.
PARACHUTE::numbers
is not the best way of respecting*PRINT-CASE*
. Possibly this variable needs to be accounted for informat-result
methods, in and after here:https://github.com/Shinmera/parachute/blob/a9fdae87abf3c5070d77a68c5a7c967da686f556/result.lisp#L244-L247