From 3e03d52fcea9fa339f5f07ccd86c3183c10f8462 Mon Sep 17 00:00:00 2001 From: Alexandre Wilhelm Date: Mon, 25 May 2015 15:22:30 -0700 Subject: [PATCH] Fixed: objj tests did only work on my system... --- Tests/Tools/ToolsTest.j | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Tests/Tools/ToolsTest.j b/Tests/Tools/ToolsTest.j index a15d1df01..ea2966173 100644 --- a/Tests/Tools/ToolsTest.j +++ b/Tests/Tools/ToolsTest.j @@ -32,7 +32,8 @@ function cleanup() { - (void)testTools { - var status; + var status, + rootDirectory = FILE.cwd(); status = OS.system(["capp", "gen", "ToolsTestApp"].map(OS.enquote).join(" ") + " > /dev/null"); [self assert:0 equals:status message:"capp gen failed"]; @@ -51,13 +52,13 @@ function cleanup() { var p = OS.popen(["objj", "--xml-output-format", "objjErrorTestFile.j"]); [self assert:1 equals:p.wait() message:"objj failed"]; - [self assert:"\nline1path/Users/Dogild/Project/cappuccino/objjErrorTestFile.jmessageCan't find superclass CPObject\n" equals:p.stdout.read() message:"objj failed"]; + [self assert:"\nline1path" + rootDirectory + "/objjErrorTestFile.jmessageCan't find superclass CPObject\n" equals:p.stdout.read() message:"objj failed"]; var p = OS.popen(["objj", "--xml-output-format", "objjWarningTestFile.j"]); [self assert:0 equals:p.wait() message:"objj failed"]; - [self assert:"\nline1path/Users/Dogild/Project/cappuccino/objjWarningTestFile.jmessage\n@import <Foundation/Foundation.j>@implementation AppController : CPObject{CPWindow theWindow;}@end\ + [self assert:"\nline1path" + rootDirectory + "/objjWarningTestFile.jmessage\n@import <Foundation/Foundation.j>@implementation AppController : CPObject{CPWindow theWindow;}@end\ \n ^\ -\nWARNING line 1 in file:/Users/Dogild/Project/cappuccino/objjWarningTestFile.j: Unknown type 'CPWindow' for ivar 'theWindow'\n" equals:p.stdout.read() message:"objj failed"]; +\nWARNING line 1 in file:" + rootDirectory + "/objjWarningTestFile.j: Unknown type 'CPWindow' for ivar 'theWindow'\n" equals:p.stdout.read() message:"objj failed"]; status = OS.system(["objj", "-m", "ToolsTestApp/AppController.j", "ToolsTestApp/AppController.j"]); [self assert:0 equals:status message:"objj failed with several files"];