diff --git a/src/options/level_tuning.rs b/src/options/level_tuning.rs index a275ebe5..0281cb99 100644 --- a/src/options/level_tuning.rs +++ b/src/options/level_tuning.rs @@ -83,6 +83,7 @@ impl LevelTuning { }; file.write_all(content.as_bytes()).unwrap(); + file.flush().unwrap(); println!( "level: {} -> {}", rule["level"].as_str().unwrap(), @@ -145,7 +146,7 @@ mod tests { level: high "#; - let path = "test_files/rules/level_tuning_sample.yml"; + let path = "test_files/rules/level_tuning.txt"; let mut file = File::create(path).unwrap(); let buf = rule_str.as_bytes(); file.write_all(buf).unwrap(); diff --git a/test_files/config/level_tuning.txt b/test_files/config/level_tuning.txt new file mode 100644 index 00000000..58a9604a --- /dev/null +++ b/test_files/config/level_tuning.txt @@ -0,0 +1,2 @@ +id,next_level +12345678-1234-1234-1234-123456789012,high \ No newline at end of file