Tests: move the lock params text test next to the lock test

This commit is contained in:
dotCooCoo
2026-11-01 11:48:41 -08:00
parent e49e102032
commit 39e69e8446
+8 -8
View File
@@ -454,6 +454,14 @@ fn locked_variables_refuse_new_deleted_and_renamed_variables() {
s.execute("variable.define", &json!({"name": "Other", "kind": "text"})).unwrap();
}
/// `variable.lock`'s params text names the dataset command it refuses: an import whose header
/// would define a variable.
#[test]
fn the_lock_params_text_names_the_refused_import() {
let params = cmd::find_command("variable.lock").unwrap().params;
assert!(params.contains("the dataset commands still run, except a dataset.import whose header would define a variable"), "{params}");
}
/// Locking is an undo step only when it changes the state, and the lock is saved with the
/// document: a file saved locked opens locked, and a file without the key opens unlocked.
#[test]
@@ -1325,14 +1333,6 @@ fn locked_variables_refuse_header_cells_that_define_variables() {
assert_eq!(imp["defined"], json!(["New"]));
}
/// `variable.lock`'s params text names the dataset command it refuses: an import whose header
/// would define a variable.
#[test]
fn the_lock_params_text_names_the_refused_import() {
let params = cmd::find_command("variable.lock").unwrap().params;
assert!(params.contains("the dataset commands still run, except a dataset.import whose header would define a variable"), "{params}");
}
/// Import / export datasets as CSV: header `name` then variables; round-trip keeps values.
#[test]
fn datasets_csv_round_trips_and_rejects_bad_input() {