mirror of
https://github.com/danbulant/robotparser-rs
synced 2026-06-15 04:31:19 +00:00
Add RobotFileParser.read test case
This commit is contained in:
parent
e27e17589c
commit
cbe515e761
1 changed files with 7 additions and 0 deletions
|
|
@ -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"));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue