You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: offline.rs
    path of file: ./repos/cargo/tests/testsuite
    
    the code of the file until where you have to start completion: //! Tests for --offline flag.

use cargo_test_support::{
    basic_manifest, git, main_file, path2url, project,
    registry::{Package, RegistryBuilder},
    Execs
    
fn cargo_compile_offline_not_try_update() {
    // When --offline needs to download the registry, provide a reasonable
    // error hint to run without --offline.
    let p = project()
        .at("bar")
        .file(
            "Cargo.toml",
            r#"
            [package]
            name = "bar"
            version = "0.1.0"
            edition = "2015"

            [dependencies]
            not_cached_dep = "1.2.5"
            "#,
        )
        .file("src/lib.rs", "")
        .build();

    let msg = "\
[ERROR] no matching package named `not_cached_dep` found
location searched: registry `crates-io`
required by package `bar v0.1.0 ([..]/bar)`
As a reminder, you're using offline mode (--offline) which can sometimes cause \
surprising resolution failures, if this error is too confusing you may wish to \
retry without the offline flag.
";

    p.cargo("check --offline")
        .with_status(101)
        .with_stderr(msg)
        .run();

    // While we're here, also check the config works.
    p.change_file(".cargo/config.toml", "net.offline = true");
    p.cargo("check").with_status(101).with_stderr(msg).run();
}