mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 13:26:16 +00:00
fix dependencies building, looks like i cant use the sim bc libs are compiled for ios
This commit is contained in:
36
Carthage/Checkouts/NMSSH/NMSSHTests/NMSFTPFileTests.m
vendored
Normal file
36
Carthage/Checkouts/NMSSH/NMSSHTests/NMSFTPFileTests.m
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
#import <XCTest/XCTest.h>
|
||||
#import "NMSFTPFile.h"
|
||||
|
||||
@interface NMSFTPFileTests : XCTestCase
|
||||
|
||||
@end
|
||||
|
||||
@implementation NMSFTPFileTests {
|
||||
NMSFTPFile *_file;
|
||||
}
|
||||
|
||||
- (void)setUp {
|
||||
[super setUp];
|
||||
_file = [[NMSFTPFile alloc] initWithFilename:@"test.txt"];
|
||||
}
|
||||
|
||||
/**
|
||||
Tests whether the filename attribute is correct after initialization.
|
||||
*/
|
||||
- (void)testInitialization {
|
||||
XCTAssertEqualObjects(_file.filename, @"test.txt", @"Filename attribut has not been set");
|
||||
NMSFTPFile *anotherFile = [NMSFTPFile fileWithName:@"test.txt"];
|
||||
XCTAssertEqualObjects(anotherFile.filename, @"test.txt", @"Filename attribut has not been set");
|
||||
}
|
||||
|
||||
/**
|
||||
Tests whether the permissions conversion from numeric to symbolic notation is correct
|
||||
*/
|
||||
-(void)testPermissionsConversion {
|
||||
LIBSSH2_SFTP_ATTRIBUTES attributes;
|
||||
attributes.permissions = 33188;
|
||||
[_file populateValuesFromSFTPAttributes:attributes];
|
||||
XCTAssertEqualObjects(_file.permissions, @"-rw-r--r--", @"The symbolic permissions notation is not correct.");
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user