test(tests/lean/run): add test for issue #1089

See #1089
This commit is contained in:
Leonardo de Moura 2016-11-24 14:51:45 -08:00
parent 4d36effe85
commit a009541b6e

21
tests/lean/run/1089.lean Normal file
View file

@ -0,0 +1,21 @@
import init.string
import init.bool
import system.io
inductive token
| eof : token
| plus : token
| var : string -> token
open token
open option
def to_token : string → option token
| [] := none
| (c :: cs) :=
let t : option token := match c with
| #"x" := some (var "x")
| #"y" := some (var "y")
| #"+" := some plus
| _ := none
end in t