Signed-off-by: hi-rustin <rustin.liu@gmail.com>
")
.run();
}
+
+#[cargo_test]
+fn offline_and_locked_and_no_frozen() {
+ let p = project().file("src/lib.rs", "").build();
+ p.cargo("build --locked --offline")
+ .with_status(101)
+ .with_stderr("\
+error: the lock file [ROOT]/foo/Cargo.lock needs to be updated but --locked was passed to prevent this
+If you want to try to generate the lock file without accessing the network, \
+remove the --locked flag and use --offline instead.
+")
+ .run();
+}