mirror of
https://github.com/rust-lang/rustlings.git
synced 2024-12-26 00:00:03 +03:00
fix
This commit is contained in:
parent
509d240d2b
commit
1ffe7fc837
|
@ -23,23 +23,21 @@ mod test {
|
||||||
const TEST_DOMAIN: &str = "https://doc.rust-kr.org";
|
const TEST_DOMAIN: &str = "https://doc.rust-kr.org";
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn non_url() {
|
fn non_rustbook_url() {
|
||||||
let replacer = UrlReplacer {
|
let replacer = UrlReplacer {
|
||||||
base_url: String::from(TEST_DOMAIN)
|
base_url: String::from(TEST_DOMAIN)
|
||||||
};
|
};
|
||||||
|
|
||||||
let hint = "\
|
let hint = "\
|
||||||
hints (...) lines (...)
|
hints (...) lines (...)
|
||||||
link: https://doc.rust-lang.org/book/ch03-02-data-types.html";
|
link: https://example.com/ch03-02-data-types.html";
|
||||||
|
|
||||||
assert_eq!("\
|
assert_eq!(hint, replacer.replace(hint));
|
||||||
hints (...) lines (...)
|
|
||||||
link: https://doc.rust-kr.org/ch03-02-data-types.html", replacer.replace(hint));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn replace_url() {
|
fn replace_rustbook_url() {
|
||||||
let replacer = UrlReplacer {
|
let replacer = UrlReplacer {
|
||||||
base_url: String::from(TEST_DOMAIN)
|
base_url: String::from(TEST_DOMAIN)
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue