diff options
author | letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2010-04-30 14:12:31 +0000 |
---|---|---|
committer | letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2010-04-30 14:12:31 +0000 |
commit | 61edbfce11285443be098bbceddb7f8f04d2a5b0 (patch) | |
tree | 67eceb95137435ba1bd916f97d292bac0ec96ebc /plugins/extraction/mlutil.mli | |
parent | 8e66761c81648add03ed21b157a3bace716b8e08 (diff) |
Fail: a way to check that a command is refused without blocking a script
"Fail cmd" is similar to "Time cmd", but instead of printing the execution time,
it reverse the exit status of cmd. "Fail cmd" is successful iff cmd has ended with
an error. This was, we can demonstrate erroneous commands in a script for
pedagogical or testing purpose without having to comment it in order to play the rest
of the script in coqide/PG.
Coq < Fail Foo.
The command has indeed failed with message:
=> Error: Unknown command of the non proof-editing mode.
Coq < Fail Check Prop.
Prop
: Type
Error: The command has not failed !
Two more remarks:
- Fail doesn't catch anomalies.
- Yes it it possible to write things like Fail Fail ... :-)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12981 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'plugins/extraction/mlutil.mli')
0 files changed, 0 insertions, 0 deletions