@@ -87,10 +87,10 @@ - (int)runExecutable:(NSString *)launchPath withArguments:(NSArray *)arguments
8787- (void )internalTestCaseWithURL : (NSURL *)URL withTempPath : (NSString *)tempPath
8888{
8989 NSFileManager *fileManager = [NSFileManager defaultManager ];
90-
90+
9191 // test case temp path is global temp path plus name of this test case
9292 tempPath = [tempPath stringByAppendingPathComponent: testCaseNameFromURL (URL, YES )];
93-
93+
9494 NSString *genstrings1OutPath = [tempPath stringByAppendingPathComponent: @" genstrings1" ];
9595 [fileManager createDirectoryAtPath: genstrings1OutPath withIntermediateDirectories: YES attributes: NULL error: NULL ];
9696
@@ -105,12 +105,12 @@ - (void)internalTestCaseWithURL:(NSURL *)URL withTempPath:(NSString *)tempPath
105105 DTLocalizableStringAggregator *aggregator = [[DTLocalizableStringAggregator alloc ] init ];
106106
107107 NSDictionary *genstrings2Parameters = [testParameters objectForKey: @" genstrings2" ];
108-
108+
109109 if (genstrings2Parameters)
110110 {
111111 [aggregator setValuesForKeysWithDictionary: genstrings2Parameters];
112112 }
113-
113+
114114 [aggregator beginProcessingFile: URL];
115115
116116 NSArray *tables = [aggregator aggregatedStringTables ];
@@ -156,7 +156,7 @@ - (void)internalTestCaseWithURL:(NSURL *)URL withTempPath:(NSString *)tempPath
156156
157157 // check if number is the same
158158 STAssertEquals ([genstrings1files count ], [genstrings2files count ], @" Different number of output strings tables" );
159-
159+
160160 for (NSString *oneFile in genstrings1files)
161161 {
162162 STAssertTrue ([genstrings2files containsObject: oneFile], @" genstring2 output is missing %@ " , oneFile);
@@ -178,7 +178,10 @@ - (void)internalTestCaseWithURL:(NSURL *)URL withTempPath:(NSString *)tempPath
178178
179179 NSString *genstrings1Contents = [NSString stringWithContentsOfFile: genstrings1File usedEncoding: NULL error: NULL ];
180180 NSString *genstrings2Contents = [NSString stringWithContentsOfFile: genstrings2File usedEncoding: NULL error: NULL ];
181-
181+
182+ // size check does not work because predicate editor output repeats comment for each token
183+ // STAssertEquals([genstrings1Contents length], [genstrings2Contents length], @"Different file sizes on %@", genstrings1File);
184+
182185 NSDictionary *genstrings1Stuff = [genstrings1Contents propertyListFromStringsFileFormat ];
183186 NSDictionary *genstrings2Stuff = [genstrings2Contents propertyListFromStringsFileFormat ];
184187
@@ -205,10 +208,8 @@ - (void)internalTestCaseWithURL:(NSURL *)URL withTempPath:(NSString *)tempPath
205208 }
206209 }
207210
208- NSLog (@" %@ " , tempPath);
209-
210211 // cleanup
211- // [[NSFileManager defaultManager] removeItemAtPath:tempPath error:NULL];
212+ [[NSFileManager defaultManager ] removeItemAtPath: tempPath error: NULL ];
212213}
213214
214215
0 commit comments