This commit is contained in:
Jakub Wieczorek 2014-07-05 16:22:21 +02:00
parent c0b76abf91
commit 1aa23b8e1c
2 changed files with 8 additions and 0 deletions

View file

@ -46,6 +46,13 @@ pub fn main() {
_ => fail!(),
}
let buf = vec!(97u8, 98, 99, 100);
assert_eq!(match buf.slice(0, 3) {
b"def" => 1u,
b"abc" => 2u,
_ => 3u
}, 2);
assert_eq!(BAZ, &[97u8, 92u8, 110u8]);
assert_eq!(br"a\n", &[97u8, 92u8, 110u8]);
assert_eq!(br"a\n", b"a\\n");