(executable
 (name test)
 (libraries yojson))

(rule
 (targets test.output)
 (deps ./sample.json ./test.exe)
 (action
  (with-stdout-to
   %{targets}
   (run ./test.exe))))

(alias
 (name runtest)
 (action
  (diff test.expected test.output)))
