fix: escape special characters in save_config TOML output
This commit is contained in:
@@ -105,3 +105,11 @@ class TestSaveConfig:
|
||||
path = tmp_path / "subdir" / "config.toml"
|
||||
save_config(Config(), path)
|
||||
assert path.exists()
|
||||
|
||||
def test_save_handles_special_characters_in_microphone(self, tmp_path):
|
||||
from whisper_local.config import save_config
|
||||
path = tmp_path / "config.toml"
|
||||
config = Config(microphone='USB "Pro" Mic')
|
||||
save_config(config, path)
|
||||
loaded = load_config(path)
|
||||
assert loaded.microphone == 'USB "Pro" Mic'
|
||||
|
||||
Reference in New Issue
Block a user