Skip to content

Commit c651c39

Browse files
author
Jacob Skadborg
committed
Add test for no space
1 parent 4754a1e commit c651c39

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

crates/modelardb_storage/src/parser.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2435,6 +2435,16 @@ mod tests {
24352435
assert!(!cluster)
24362436
}
24372437

2438+
#[test]
2439+
fn test_tokenize_and_parse_optimize_with_target_size_and_unit_without_space() {
2440+
let (table_names, maybe_target_size_in_bytes, cluster) =
2441+
parse_optimize_and_extract_table_names("OPTIMIZE TARGET 1MB");
2442+
2443+
assert!(table_names.is_empty());
2444+
assert_eq!(maybe_target_size_in_bytes, Some(1024 * 1024));
2445+
assert!(!cluster)
2446+
}
2447+
24382448
#[test]
24392449
fn test_tokenize_and_parse_optimize_multiple_tables_with_target_size() {
24402450
let (table_names, maybe_target_size_in_bytes, cluster) =

0 commit comments

Comments
 (0)