From f91cfdc4e77edc2c8f2efb93324a082694ae4724 Mon Sep 17 00:00:00 2001 From: Alexander Stein Date: Wed, 7 May 2025 21:19:49 +0200 Subject: [PATCH 1/3] merge: Fix merge_subcommand_repository_state_validation Parsing git's stdout needs to be tested on a fixed locale, non-english locales break this test. Also fix the expected output later on. --- tests/merge.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/merge.rs b/tests/merge.rs index 2445833..d61c280 100644 --- a/tests/merge.rs +++ b/tests/merge.rs @@ -7161,6 +7161,7 @@ fn merge_subcommand_git_merge_flags() { /// Test repository state validation in the merge command #[test] fn merge_subcommand_repository_state_validation() { + std::env::set_var("LANG", "C"); println!("\n=== TEST: MERGE SUBCOMMAND REPOSITORY STATE VALIDATION ==="); let repo_name = "merge_repo_state_validation"; let repo = setup_git_repo(repo_name); @@ -7325,7 +7326,7 @@ fn merge_subcommand_repository_state_validation() { ); assert!( - stdout.contains("Chain feature_chain"), + stdout.contains("Chain: feature_chain"), "Output should mention the chain name, got: {}", stdout ); From c60f2c6b48d6216cff6fb7c7d650b2a6cb1c5c76 Mon Sep 17 00:00:00 2001 From: Alexander Stein Date: Wed, 7 May 2025 21:21:27 +0200 Subject: [PATCH 2/3] merge_base_failures: Fix test_complex_rebased_remote_history Parsing git's stdout needs to be tested on a fixed locale, non-english locales break this test. --- tests/merge_base_failures.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/merge_base_failures.rs b/tests/merge_base_failures.rs index e43c624..14c0f76 100644 --- a/tests/merge_base_failures.rs +++ b/tests/merge_base_failures.rs @@ -12,6 +12,7 @@ use git2::RepositoryState; /// that can confuse fork-point detection. #[test] fn test_complex_rebased_remote_history() { + std::env::set_var("LANG", "C"); let repo_name = "complex_rebased_remote"; let repo = setup_git_repo(repo_name); let path_to_repo = generate_path_to_repo(repo_name); From 8fbd58176c7bd36b696927eee2423e9fbb147931 Mon Sep 17 00:00:00 2001 From: Alexander Stein Date: Wed, 7 May 2025 21:23:17 +0200 Subject: [PATCH 3/3] rebase: Fix rebase_no_forkpoint Parsing git's stdout needs to be tested on a fixed locale, non-english locales break this test. --- tests/rebase.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/rebase.rs b/tests/rebase.rs index abe2a72..67d7644 100644 --- a/tests/rebase.rs +++ b/tests/rebase.rs @@ -1077,6 +1077,7 @@ chain_name #[test] fn rebase_no_forkpoint() { + std::env::set_var("LANG", "C"); let repo_name = "rebase_no_forkpoint"; let repo = setup_git_repo(repo_name); let path_to_repo = generate_path_to_repo(repo_name);