From f8f28e29be16131afe71bd3854d645b87664495b Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Fri, 17 Feb 2012 17:34:44 -0800 Subject: [PATCH] rustdoc: Add a test that we can tolerate missing external crates --- src/rustdoc/astsrv.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/rustdoc/astsrv.rs b/src/rustdoc/astsrv.rs index 3c6405d08c6..750e3a2aeaf 100644 --- a/src/rustdoc/astsrv.rs +++ b/src/rustdoc/astsrv.rs @@ -221,11 +221,17 @@ fn srv_should_resolve_non_existant_imports() { } #[test] -fn srv_sholud_resolve_non_existant_uses() { +fn srv_should_resolve_non_existant_uses() { let source = "use forble; fn a() { }"; mk_srv_from_str(source); } +#[test] +fn should_ignore_external_import_paths_that_dont_exist() { + let source = "use forble; import forble::bippy;"; + mk_srv_from_str(source); +} + fn exec( srv: srv, f: fn~(ctxt: ctxt) -> T