diff options
author | Navan Chauhan <navanchauhan@gmail.com> | 2024-07-28 14:55:56 -0600 |
---|---|---|
committer | Navan Chauhan <navanchauhan@gmail.com> | 2024-07-28 14:55:56 -0600 |
commit | 06649f47a8b1d65590ee8a8f78668d064e92f56b (patch) | |
tree | d3566b5e9bcc233864407e2389c51fc6b9657e3e /Tests/swiftGopherServerTests/swiftGopherServerTests.swift | |
parent | d983c019c74c75eb18e68dfc6d31c5e4ddb2f6f6 (diff) |
rename and capitalize
Diffstat (limited to 'Tests/swiftGopherServerTests/swiftGopherServerTests.swift')
-rw-r--r-- | Tests/swiftGopherServerTests/swiftGopherServerTests.swift | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/Tests/swiftGopherServerTests/swiftGopherServerTests.swift b/Tests/swiftGopherServerTests/swiftGopherServerTests.swift deleted file mode 100644 index 0413d90..0000000 --- a/Tests/swiftGopherServerTests/swiftGopherServerTests.swift +++ /dev/null @@ -1,63 +0,0 @@ -// -// swiftGopherServerTests.swift -// -// -// Created by Navan Chauhan on 7/28/24. -// - -import ArgumentParser -import NIO -import XCTest - -@testable import swift_gopher - -final class SwiftGopherTests: XCTestCase { - - func testDefaultValues() throws { - let gopher = try swiftGopher.parse([]) - - XCTAssertEqual(gopher.gopherHostName, "localhost") - XCTAssertEqual(gopher.host, "0.0.0.0") - XCTAssertEqual(gopher.port, 8080) - XCTAssertEqual(gopher.gopherDataDir, "./example-gopherdata") - XCTAssertFalse(gopher.disableSearch) - XCTAssertFalse(gopher.disableGophermap) - } - - func testCustomValues() throws { - let args = [ - "--gopher-host-name", "example.com", - "--host", "127.0.0.1", - "--port", "9090", - "--gopher-data-dir", "/custom/path", - "--disable-search", - "--disable-gophermap", - ] - - let gopher = try swiftGopher.parse(args) - - XCTAssertEqual(gopher.gopherHostName, "example.com") - XCTAssertEqual(gopher.host, "127.0.0.1") - XCTAssertEqual(gopher.port, 9090) - XCTAssertEqual(gopher.gopherDataDir, "/custom/path") - XCTAssertTrue(gopher.disableSearch) - XCTAssertTrue(gopher.disableGophermap) - } - - func testShortOptions() throws { - let args = [ - "-g", "short.com", - "-h", "192.168.1.1", - "-p", "7070", - "-d", "/short/path", - ] - - let gopher = try swiftGopher.parse(args) - - XCTAssertEqual(gopher.gopherHostName, "short.com") - XCTAssertEqual(gopher.host, "192.168.1.1") - XCTAssertEqual(gopher.port, 7070) - XCTAssertEqual(gopher.gopherDataDir, "/short/path") - } - -} |