-(let ((safe-chars
- ;; for WIN32, we might want to remove #\: here
- (coerce
- (cons #\Newline
- (loop for x from 32 to 127 collect (code-char x)))
- 'simple-base-string))
- (tricky-sequences #("/../" "../" "/.." "." "/." "./" "/./"
- "[]" "*" "**" "/**" "**/" "/**/" "?"
- "\\*" "\\[]" "\\?" "\\*\\*" "*\\*")))
- (loop repeat 1000
- for length = (random 32)
- for native-namestring = (coerce
- (loop repeat length
- collect
- (char safe-chars
- (random (length safe-chars))))
- 'simple-base-string)
- for pathname = (native-pathname native-namestring)
- for nnn = (native-namestring pathname)
- do (assert (string= nnn native-namestring)))
- (loop repeat 1000
- for native-namestring = (with-output-to-string (s)
- (loop
+(with-test (:name :random-native-namestrings)
+ (let ((safe-chars
+ (coerce
+ (cons #\Newline
+ (loop for x from 32 to 127 collect (code-char x)))
+ 'simple-base-string))
+ (tricky-sequences #("/../" "../" "/.." "." "/." "./" "/./"
+ "[]" "*" "**" "/**" "**/" "/**/" "?"
+ "\\*" "\\[]" "\\?" "\\*\\*" "*\\*")))
+ (loop repeat 1000
+ for length = (random 32)
+ for native-namestring = (coerce
+ (loop repeat length
+ collect
+ (char safe-chars
+ (random (length safe-chars))))
+ 'simple-base-string)
+ for pathname = (native-pathname native-namestring)
+ for nnn = (native-namestring pathname)
+ do (assert (string= nnn native-namestring)))
+ (loop repeat 1000
+ for native-namestring = (with-output-to-string (s)
+ (loop