Skip to content

Commit efa5688

Browse files
committed
Make resolve tests pass for systems where /bin/ls is /usr/bin/ls
See issue #260
1 parent f76416f commit efa5688

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/test/php/net/xp_framework/unittest/core/ProcessResolveTest.class.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,20 +104,19 @@ public function resolveNonExistantFullyQualified() {
104104
Process::resolve('/@@non-existant@@');
105105
}
106106

107-
#[Test, Action(eval: 'new IsPlatform("!(WIN|ANDROID)")')]
108-
public function resolveFullyQualifiedOnPosix() {
109-
$fq= '/bin/ls';
110-
$this->assertEquals($fq, Process::resolve($fq));
111-
}
112-
113107
#[Test, Action(eval: 'new IsPlatform("ANDROID")')]
114108
public function resolveFullyQualifiedOnAndroid() {
115109
$fq= getenv('ANDROID_ROOT').'/framework/core.jar';
116110
$this->assertEquals($fq, Process::resolve($fq));
117111
}
118112

113+
#[Test, Action(eval: 'new IsPlatform("!(WIN|ANDROID)")')]
114+
public function resolveFullyQualifiedOnPosix() {
115+
$this->assertTrue(in_array(Process::resolve('/bin/ls'), ['/usr/bin/ls', '/bin/ls']));
116+
}
117+
119118
#[Test, Action(eval: 'new IsPlatform("!(WIN|ANDROID)")')]
120119
public function resolve() {
121-
$this->assertEquals('/bin/ls', Process::resolve('ls'));
120+
$this->assertTrue(in_array(Process::resolve('ls'), ['/usr/bin/ls', '/bin/ls']));
122121
}
123122
}

0 commit comments

Comments
 (0)