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.
15 ETag(Vec<String>, String),
16 UTag(Vec<String>, String),
17 Section(Vec<String>, bool, Vec<Token>, String,
18 String, String, String, String),
19 IncompleteSection(Vec<String>, bool, String, bool),
20 Partial(String, String, String),
23 fn check_strs(actual: &str, expected: &str) -> bool
27 println!("Found {}, but expected {}", actual, expected);
35 // assert!(check_strs(fmt!("%?", Text(@"foo".to_string())), "Text(@~\"foo\")"));
36 // assert!(check_strs(fmt!("%?", ETag(@~["foo".to_string()], @"bar".to_string())),
37 // "ETag(@~[ ~\"foo\" ], @~\"bar\")"));
39 let t = Token::Text("foo".to_string());
40 let u = Token::Section(vec!["alpha".to_string()],
44 "foo".to_string(), "foo".to_string(), "foo".to_string(),
46 let v = format!("{}", u); // this is the line that causes the seg fault