()
| 137 | |
| 138 | #[test] |
| 139 | fn test_search_load_config() { |
| 140 | let temp_dir = TempDir::new().unwrap(); |
| 141 | let dir_path = temp_dir.path().to_str().unwrap(); |
| 142 | |
| 143 | fs::write( |
| 144 | temp_dir.path().join("app.toml"), |
| 145 | r#"override = "from_toml""#, |
| 146 | ) |
| 147 | .unwrap(); |
| 148 | |
| 149 | let default_toml = r#" |
| 150 | foo = "value" |
| 151 | override = "default" |
| 152 | "#; |
| 153 | |
| 154 | let result = search_load_config("app", &[dir_path], default_toml, None, false); |
| 155 | |
| 156 | assert_eq!(result.extract_inner::<String>("foo").unwrap(), "value"); |
| 157 | assert_eq!( |
| 158 | result.extract_inner::<String>("override").unwrap(), |
| 159 | "from_toml" |
| 160 | ); |
| 161 | } |
| 162 | |
| 163 | #[test] |
| 164 | fn test_search_load_config2() { |
nothing calls this directly
no test coverage detected