From b872e19eb6282f3c96d1802177d65c08477f32f7 Mon Sep 17 00:00:00 2001 From: Adam Cimarosti Date: Mon, 29 Jan 2024 12:43:00 +0000 Subject: [PATCH] test: empty value parsing allowed --- tests/tests.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/tests.rs b/tests/tests.rs index 89c5f33..fb295b7 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -347,3 +347,12 @@ fn invalid_ctrl_chars_in_value() { ); } } + +#[test] +fn empty_value() -> Result<(), ParsingError> { + let input = "http::x=;"; + let config = parse_conf_str(input)?; + assert_eq!(config.service(), "http"); + assert_eq!(config.get("x"), Some("")); + Ok(()) +}