assert (!proc_has_transformations (ds));
assert (n < dict_get_n_vars (ds->dict));
+ caseinit_mark_for_init (ds->caseinit, ds->dict);
+ ds->source = caseinit_translate_casereader_to_init_vars (
+ ds->caseinit, dict_get_proto (ds->dict), ds->source);
+ caseinit_clear (ds->caseinit);
+ caseinit_mark_as_preinited (ds->caseinit, ds->dict);
+
dict_delete_vars (ds->dict, vars, n);
ds->source = case_map_create_input_translator (
case_map_to_compact_dict (ds->dict, 0), ds->source);
])
AT_CLEANUP
+dnl Checks for regression against a crash reported privately by
+dnl knassen(at)chartermi.net on March 1, 2023.
+AT_SETUP([DELETE VARIABLES crash 2])
+AT_DATA([delete-variables.sps], [dnl
+DATA LIST LIST NOTABLE /foo (A5).
+STRING bar (A8).
+DELETE VARIABLES foo.
+LIST.
+BEGIN DATA.
+asdf
+END DATA.
+])
+AT_CHECK([pspp -O format=csv delete-variables.sps], [0], [dnl
+Table: Data List
+bar
+
+])
+AT_CLEANUP
+
AT_SETUP([DELETE VARIABLES syntax errors])
AT_DATA([delete-variables.sps], [dnl
DATA LIST LIST NOTABLE /x y z.