unistd: add getcwd

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
Simon Rozman
2023-09-20 03:24:24 +02:00
parent bcd2fd127a
commit 7374e0dc38
4 changed files with 47 additions and 2 deletions

View File

@@ -5,6 +5,7 @@
#import <XCTest/XCTest.h>
#include "../include/MacStd/dyld.hpp"
#include "../include/MacStd/unistd.hpp"
@interface Tests : XCTestCase
@end
@@ -24,6 +25,11 @@
XCTAssert(_NSGetExecutablePath(path) == 0);
}
- (void)test_getcwd {
std::string path;
XCTAssert(getcwd(path));
}
- (void)testPerformanceExample {
// This is an example of a performance test case.
[self measureBlock:^{