Skip to content

Commit 7363f43

Browse files
committed
Add offline_and_locked_and_no_frozen test
Signed-off-by: hi-rustin <[email protected]>
1 parent 17ec415 commit 7363f43

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/testsuite/offline.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -700,3 +700,16 @@ remove the --frozen flag and use --offline instead.
700700
")
701701
.run();
702702
}
703+
704+
#[cargo_test]
705+
fn offline_and_locked_and_no_frozen() {
706+
let p = project().file("src/lib.rs", "").build();
707+
p.cargo("build --locked --offline")
708+
.with_status(101)
709+
.with_stderr("\
710+
error: the lock file [ROOT]/foo/Cargo.lock needs to be updated but --locked was passed to prevent this
711+
If you want to try to generate the lock file without accessing the network, \
712+
remove the --locked flag and use --offline instead.
713+
")
714+
.run();
715+
}

0 commit comments

Comments
 (0)