Add RobotFileParser.read test case

This commit is contained in:
messense 2015-07-01 10:23:07 +08:00
parent e27e17589c
commit cbe515e761

View file

@ -210,3 +210,10 @@ fn test_robots_txt_13() {
let bad = vec!["/another/path?"];
robot_test_simple(doc, good, bad);
}
#[test]
fn test_robots_txt_read() {
let parser = RobotFileParser::new("http://www.python.org/robots.txt");
parser.read();
assert!(parser.can_fetch("*", "http://www.python.org/robots.txt"));
}