Unified · Split
| @@ -141,6 +141,7 @@ fn write_main_config( · 140 unmodified lines | |||
| 141 | if overwrite_config_location == &ConfigLocation::Repo { | 141 | if overwrite_config_location == &ConfigLocation::Repo { |
| 142 | Command::new("git") | 142 | Command::new("git") |
| 143 | .args(["config", "section.value", "base-value"]) | 143 | .args(["config", "section.value", "base-value"]) |
| 144 | .env("GIT_DIR", git_dir) | ||
| 144 | .output() | 145 | .output() |
| 145 | .unwrap(); | 146 | .unwrap(); |
| 146 | } | 147 | } |
| @@ -213,6 +214,17 @@ fn star_star_prefix_and_suffix() { · 66 unmodified lines | |||
| 213 | }); | 214 | }); |
| 214 | } | 215 | } |
| 215 | 216 | ||
| 217 | #[test] | ||
| 218 | #[serial] | ||
| 219 | fn dot_path_slash() { | ||
| 220 | assert_section_value(Options { | ||
| 221 | condition: "gitdir:./", | ||
| 222 | git_dir: &git_dir(&tempdir().unwrap(), "foo"), | ||
| 223 | config_location: ConfigLocation::User, | ||
| 224 | ..Default::default() | ||
| 225 | }); | ||
| 226 | } | ||
| 227 | |||
| 216 | #[test] | 228 | #[test] |
| 217 | #[serial] | 229 | #[serial] |
| 218 | fn dot_path() { | 230 | fn dot_path() { |
| @@ -234,6 +246,18 @@ fn case_insensitive() { · 15 unmodified lines | |||
| 234 | }); | 246 | }); |
| 235 | } | 247 | } |
| 236 | 248 | ||
| 249 | #[test] | ||
| 250 | #[serial] | ||
| 251 | #[ignore] | ||
| 252 | fn pattern_with_backslash() { | ||
| 253 | assert_section_value(Options { | ||
| 254 | condition: "gitdir:\\foo/", | ||
| 255 | git_dir: &git_dir(&tempdir().unwrap(), "foo"), | ||
| 256 | expected: Value::Original, | ||
| 257 | ..Default::default() | ||
| 258 | }); | ||
| 259 | } | ||
| 260 | |||
| 237 | #[test] | 261 | #[test] |
| 238 | #[serial] | 262 | #[serial] |
| 239 | fn star_star_in_the_middle() { | 263 | fn star_star_in_the_middle() { |