From 9c150609caf02835cdaab105a541fc7502884915 Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Fri, 6 Oct 2017 13:14:39 -0400 Subject: Fix up env check for changes to XCTest running --- Foundation/GTMScriptRunnerTest.m | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Foundation') diff --git a/Foundation/GTMScriptRunnerTest.m b/Foundation/GTMScriptRunnerTest.m index c8050f5..5f52e61 100644 --- a/Foundation/GTMScriptRunnerTest.m +++ b/Foundation/GTMScriptRunnerTest.m @@ -218,6 +218,11 @@ // Account for the shell level. [currVars setObject:@"1" forKey:@"SHLVL"]; + // Xcode inserts DYLD_FRAMEWORK_PATH and DYLD_LIBRARY_PATH when running XCTests, + // but that doesn't get passed on when running the script. + [currVars removeObjectForKey:@"DYLD_FRAMEWORK_PATH"]; + [currVars removeObjectForKey:@"DYLD_LIBRARY_PATH"]; + output = [sr run:@"/usr/bin/env | /usr/bin/sort" standardError:&error]; NSArray *lineArray = [output componentsSeparatedByString:@"\n"]; XCTAssertEqual([lineArray count], [currVars count], -- cgit v1.2.3