[functional-tests] Add thin_repair test for accidental XML input.
Was segfaulting.
This commit is contained in:
parent
5b92f410ec
commit
331303fe03
@ -20,6 +20,7 @@
|
|||||||
(define-tool thin-dump)
|
(define-tool thin-dump)
|
||||||
(define-tool thin-restore)
|
(define-tool thin-restore)
|
||||||
(define-tool thin-rmap)
|
(define-tool thin-rmap)
|
||||||
|
(define-tool thin-repair)
|
||||||
|
|
||||||
(define-syntax with-thin-xml
|
(define-syntax with-thin-xml
|
||||||
(syntax-rules ()
|
(syntax-rules ()
|
||||||
@ -303,4 +304,13 @@
|
|||||||
(receive (_ stderr) (run-fail "thin_delta --snap1 45 --snap2 46")
|
(receive (_ stderr) (run-fail "thin_delta --snap1 45 --snap2 46")
|
||||||
(assert-starts-with "No input device provided." stderr)))
|
(assert-starts-with "No input device provided." stderr)))
|
||||||
|
|
||||||
|
;;;-----------------------------------------------------------
|
||||||
|
;;; thin_repair scenarios
|
||||||
|
;;;-----------------------------------------------------------
|
||||||
|
(define-scenario (thin-repair dont-repair-xml)
|
||||||
|
"Fails gracefully if run on XML rather than metadata"
|
||||||
|
(with-thin-xml (xml)
|
||||||
|
(with-empty-metadata (md)
|
||||||
|
(receive (_ stderr) (run-fail "thin_repair -i " xml "-o" md)
|
||||||
|
#t))))
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user