; if you modify this file, add 'test' to the 'skip' field in drom.toml

; a first example where we would test the behavior of one of the executables
; that we generate else-where

(rule
 (deps test1.expected)
 (action
  (with-stdout-to
   test1.output
   (run cat test1.expected))))

(rule
 (alias runtest)
 (action
  (diff test1.expected test1.output)))

; a second example where we generate a file and test its output

(executable
 (name test2)
 (libraries psmt2-frontend) ; add your own library here
 )

(alias
 (name buildtest)
 (deps test2.exe))

(rule
(deps min.smt2)
(action (with-stdout-to
  test2.output
  (run %{exe:test2.exe} min.smt2))))

(rule
 (alias runtest)
 (action
  (diff test2.expected test2.output)))
