aboutsummaryrefslogtreecommitdiff
path: root/Foundation/GTMScriptRunnerTest.m
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2010-06-02 17:36:03 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2010-06-02 17:36:03 +0000
commit0608b15caa35831a16aa7e5fd1490df24dd01784 (patch)
treed36c1f14713752cc077b6afe320c0e9123618293 /Foundation/GTMScriptRunnerTest.m
parenta470905a1dffcc61761dc49be13c2d1c8761d0d1 (diff)
[Author: dmaclach]
Cleans up builds of GTM on Snow Leopard with gcc 4.2. Cleans up iPhone configs Adds libgcov for Snow Leopard Fixes up some small bugs. R=thomasvl DELTA=2028 (972 added, 990 deleted, 66 changed)
Diffstat (limited to 'Foundation/GTMScriptRunnerTest.m')
-rw-r--r--Foundation/GTMScriptRunnerTest.m30
1 files changed, 15 insertions, 15 deletions
diff --git a/Foundation/GTMScriptRunnerTest.m b/Foundation/GTMScriptRunnerTest.m
index 1da7f78..f13fe6c 100644
--- a/Foundation/GTMScriptRunnerTest.m
+++ b/Foundation/GTMScriptRunnerTest.m
@@ -382,34 +382,34 @@
STAssertNotNil(sr, @"Script runner must not be nil");
NSString *output = nil, *err = nil, *cmd = nil;
- NSString *generator_format_str =
- @"import sys\n"
- @"block = '.' * 512\n"
- @"for x in [%@]:\n"
- @" to_where = x[0]\n"
- @" how_many = int(x[1:])\n"
- @" for x in xrange(0, how_many):\n"
- @" if to_where in [ 'o', 'b' ]:\n"
- @" sys.stdout.write(block)\n"
- @" if to_where in [ 'e', 'b' ]:\n"
- @" sys.stderr.write(block)\n";
+ #define GENERATOR_FORMAT_STR \
+ @"import sys\n" \
+ @"block = '.' * 512\n" \
+ @"for x in [%@]:\n" \
+ @" to_where = x[0]\n" \
+ @" how_many = int(x[1:])\n" \
+ @" for x in xrange(0, how_many):\n" \
+ @" if to_where in [ 'o', 'b' ]:\n" \
+ @" sys.stdout.write(block)\n" \
+ @" if to_where in [ 'e', 'b' ]:\n" \
+ @" sys.stderr.write(block)\n"
// Make sure we get both blocks
- cmd = [NSString stringWithFormat:generator_format_str, @"'b1'"];
+ cmd = [NSString stringWithFormat:GENERATOR_FORMAT_STR, @"'b1'"];
STAssertNotNil(cmd, nil);
output = [sr run:cmd standardError:&err];
STAssertEquals([output length], (NSUInteger)512, nil);
STAssertEquals([err length], (NSUInteger)512, nil);
// Test a large amount of data on only one connections at a time.
- cmd = [NSString stringWithFormat:generator_format_str, @"'b1', 'o200'"];
+ cmd = [NSString stringWithFormat:GENERATOR_FORMAT_STR, @"'b1', 'o200'"];
STAssertNotNil(cmd, nil);
output = [sr run:cmd standardError:&err];
STAssertEquals([output length], (NSUInteger)(512 + 512*200), nil);
STAssertEquals([err length], (NSUInteger)512, nil);
#if 0
// Not fixed yet
- cmd = [NSString stringWithFormat:generator_format_str, @"'b1', 'e200'"];
+ cmd = [NSString stringWithFormat:GENERATOR_FORMAT_STR, @"'b1', 'e200'"];
STAssertNotNil(cmd, nil);
output = [sr run:cmd standardError:&err];
STAssertEquals([output length], (NSUInteger)512, nil);
@@ -419,7 +419,7 @@
// Now send a large amount down both to make sure we spool it all in.
#if 0
// Not fixed yet
- cmd = [NSString stringWithFormat:generator_format_str, @"'b200'"];
+ cmd = [NSString stringWithFormat:GENERATOR_FORMAT_STR, @"'b200'"];
STAssertNotNil(cmd, nil);
output = [sr run:cmd standardError:&err];
STAssertEquals([output length], (NSUInteger)(512*200), nil);