1 // Copyright 2013 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 #![feature(managed_boxes)]
15 ETag(@Vec<StrBuf> , @StrBuf),
16 UTag(@Vec<StrBuf> , @StrBuf),
17 Section(@Vec<StrBuf> , bool, @Vec<Token> , @StrBuf, @StrBuf, @StrBuf, @StrBuf, @StrBuf),
18 IncompleteSection(@Vec<StrBuf> , bool, @StrBuf, bool),
19 Partial(@StrBuf, @StrBuf, @StrBuf),
22 fn check_strs(actual: &str, expected: &str) -> bool
26 println!("Found {}, but expected {}", actual, expected);
34 // assert!(check_strs(fmt!("%?", Text(@"foo".to_owned())), "Text(@~\"foo\")"));
35 // assert!(check_strs(fmt!("%?", ETag(@~["foo".to_owned()], @"bar".to_owned())),
36 // "ETag(@~[ ~\"foo\" ], @~\"bar\")"));
38 let t = Text(@"foo".to_strbuf());
39 let u = Section(@vec!("alpha".to_strbuf()),
43 @"foo".to_strbuf(), @"foo".to_strbuf(), @"foo".to_strbuf(),
45 let v = format!("{:?}", u); // this is the line that causes the seg fault