25 lines
775 B
Plaintext
25 lines
775 B
Plaintext
;;; regression tests for LOCALFILE-PATCH:
|
|
|
|
;; Patch 1
|
|
|
|
(do-test "DLion renamefile bug"
|
|
(or (not (eq (il:machinetype) 'il:dandelion)) ;This is only a DLion bug
|
|
(let (foo)
|
|
(il:closef (il:openstream "{dsk}foo" 'il:output 'il:new))
|
|
(setq foo (il:openstream "{dsk}foo" 'il:input 'il:old))
|
|
(prog1
|
|
(not (il:renamefile "{dsk}foo" "{dsk}bar"))
|
|
(il:delfile (il:closef foo))))))
|
|
|
|
;; Patch 2
|
|
|
|
(do-test-group "Rename nonexistant file"
|
|
:before (ignore-errors (il:delfile "{dsk}this-file-does-not-exist;1"))
|
|
:after (ignore-errors (il:delfile "{dsk}rename-target"))
|
|
(do-test "Renaming nonexistant file"
|
|
(expect-errors (error)
|
|
(rename-file "{dsk}this-file-does-not-exist;1" "{dsk}rename-target")
|
|
)
|
|
)
|
|
)
|