@@ -21,7 +21,7 @@ func TestInitEnhancedFlow(t *testing.T) {
2121
2222 // 1. Setup a fake Git repo
2323 require .NoError (t , exec .Command ("git" , "init" , tempDir ).Run ())
24-
24+
2525 // Create a sample file
2626 sampleContent := `package main
2727// Test Init
@@ -51,7 +51,7 @@ func main() {}`
5151 // JSON marshaling escapes '>', so we unmarshal to verify content properly
5252 var mappingData map [string ]interface {}
5353 require .NoError (t , json .Unmarshal (mappingContent , & mappingData ))
54-
54+
5555 comments := mappingData ["comments" ].(map [string ]interface {})
5656 var foundTranslation bool
5757 for _ , v := range comments {
@@ -91,7 +91,7 @@ func TestInitGlobalConfigInheritance(t *testing.T) {
9191 // Create a fake global config in a subfolder
9292 fakeHome := filepath .Join (tempDir , "fake_home" )
9393 os .MkdirAll (filepath .Join (fakeHome , ".codei18n" ), 0755 )
94-
94+
9595 globalConfig := `{
9696 "sourceLanguage": "fr",
9797 "localLanguage": "de",
@@ -103,7 +103,7 @@ func TestInitGlobalConfigInheritance(t *testing.T) {
103103 }`
104104 os .WriteFile (filepath .Join (fakeHome , ".codei18n" , "config.json" ), []byte (globalConfig ), 0644 )
105105
106- // Run init in a project dir, pointing to fake config via --config flag?
106+ // Run init in a project dir, pointing to fake config via --config flag?
107107 // The init command logic uses config.LoadConfig() which looks at HOME.
108108 // We cannot easily mock HOME env var for the subprocess unless we set it.
109109 projectDir := filepath .Join (tempDir , "project" )
@@ -113,14 +113,14 @@ func TestInitGlobalConfigInheritance(t *testing.T) {
113113 cmd .Dir = projectDir
114114 // Mock HOME to point to fake_home
115115 cmd .Env = append (os .Environ (), "HOME=" + fakeHome )
116-
116+
117117 out , err := cmd .CombinedOutput ()
118118 require .NoError (t , err , string (out ))
119119
120120 // Verify project config
121121 projectConfigPath := filepath .Join (projectDir , ".codei18n" , "config.json" )
122122 require .FileExists (t , projectConfigPath )
123-
123+
124124 content , _ := os .ReadFile (projectConfigPath )
125125 sContent := string (content )
126126
0 commit comments