diff --git a/tests/test.rs b/tests/test.rs index a976962..928a6c2 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -1,6 +1,10 @@ -use configparser::ini::{Ini, WriteOptions}; +use configparser::ini::Ini; +use std::collections::HashSet; use std::error::Error; +#[cfg(indexmap)] +use configparser::init::WriteOptions; + #[test] #[allow(clippy::approx_constant)] fn non_cs() -> Result<(), Box> { @@ -243,8 +247,12 @@ basic_option=basic_value config.read(FILE_CONTENTS.to_owned())?; assert_eq!( - config.sections(), - vec![String::from("basic_section"), String::from("empty_section")] + HashSet::from_iter(config.sections().into_iter()), + HashSet::from([String::from("basic_section"), String::from("empty_section")]) + ); + + Ok(()) +} ); Ok(())