test: Add test for string matching in pattern alts. Closes #53

This commit is contained in:
Brian Anderson 2011-06-22 22:05:11 -07:00
parent 54566e9037
commit 7105cd1761

View File

@ -0,0 +1,21 @@
// Issue #53
fn main() {
alt ("test") {
case ("not-test") { fail; }
case ("test") { }
case (_) { fail; }
}
tag t {
tag1(str);
tag2;
}
alt (tag1("test")) {
case (tag2) { fail; }
case (tag1("not-test")) { fail; }
case (tag1("test")) { }
case (_) { fail; }
}
}