mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 13:52:28 +00:00
Get more Python tests passing (#141)
This commit is contained in:
parent
916f19eea1
commit
59e1c245d1
141 changed files with 3536 additions and 1203 deletions
|
@ -75,19 +75,31 @@ TEST(commandv, testSlashes_wontSearchPath_butStillAppendsComExtension) {
|
|||
if (!IsWindows()) EXPECT_EQ(i + 2, g_syscount);
|
||||
}
|
||||
|
||||
TEST(commandv, testSameDir_doesntHappenByDefault) {
|
||||
TEST(commandv, testSameDir_doesntHappenByDefaultUnlessItsWindows) {
|
||||
EXPECT_NE(-1, touch("bog", 0755));
|
||||
EXPECT_EQ(NULL, commandv("bog", pathbuf));
|
||||
if (IsWindows()) {
|
||||
EXPECT_STREQ("./bog", commandv("bog", pathbuf));
|
||||
} else {
|
||||
EXPECT_EQ(NULL, commandv("bog", pathbuf));
|
||||
}
|
||||
}
|
||||
|
||||
TEST(commandv, testSameDir_willHappenWithColonBlank) {
|
||||
CHECK_NE(-1, setenv("PATH", "bin:", true));
|
||||
EXPECT_NE(-1, touch("bog", 0755));
|
||||
EXPECT_STREQ("bog", commandv("bog", pathbuf));
|
||||
if (IsWindows()) {
|
||||
EXPECT_STREQ("./bog", commandv("bog", pathbuf));
|
||||
} else {
|
||||
EXPECT_STREQ("bog", commandv("bog", pathbuf));
|
||||
}
|
||||
}
|
||||
|
||||
TEST(commandv, testSameDir_willHappenWithColonBlank2) {
|
||||
CHECK_NE(-1, setenv("PATH", ":bin", true));
|
||||
EXPECT_NE(-1, touch("bog", 0755));
|
||||
EXPECT_STREQ("bog", commandv("bog", pathbuf));
|
||||
if (IsWindows()) {
|
||||
EXPECT_STREQ("./bog", commandv("bog", pathbuf));
|
||||
} else {
|
||||
EXPECT_STREQ("bog", commandv("bog", pathbuf));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue