Skip to content

Commit

Permalink
test: Add test for string matching in pattern alts. Closes #53
Browse files Browse the repository at this point in the history
  • Loading branch information
brson committed Jun 23, 2011
1 parent 54566e9 commit 7105cd1
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/test/run-pass/alt-str.rs
Original file line number Diff line number Diff line change
@@ -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; }
}
}

0 comments on commit 7105cd1

Please sign in to comment.