1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 23:42:31 +03:00

Test that the key value parser accepts alphabetic keys & values.

This commit is contained in:
Rob Rix 2015-09-18 13:46:52 -04:00
parent c92dbc446b
commit 56c139cd0b
3 changed files with 13 additions and 15 deletions

View File

@ -8,12 +8,12 @@
/* Begin PBXBuildFile section */
D40024EC1BAC62BA00A110B8 /* Swift.swift in Sources */ = {isa = PBXBuildFile; fileRef = D40024EB1BAC62BA00A110B8 /* Swift.swift */; };
D40024EE1BAC819000A110B8 /* SwiftTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D40024ED1BAC819000A110B8 /* SwiftTests.swift */; };
D432D4711BA9AC0B00F3FABC /* DiffTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D432D4701BA9AC0B00F3FABC /* DiffTests.swift */; };
D432D4731BA9C55300F3FABC /* Stream.swift in Sources */ = {isa = PBXBuildFile; fileRef = D432D4721BA9C55300F3FABC /* Stream.swift */; };
D432D4751BA9D6A400F3FABC /* Memo.swift in Sources */ = {isa = PBXBuildFile; fileRef = D432D4741BA9D6A400F3FABC /* Memo.swift */; };
D432D4771BA9FE6A00F3FABC /* Comparable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D432D4761BA9FE6A00F3FABC /* Comparable.swift */; };
D4AAE50E1B5AE22E004E581F /* Doubt.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D4AAE4FD1B5AE22E004E581F /* Doubt.framework */; };
D4AAE5131B5AE22E004E581F /* DoubtTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4AAE5121B5AE22E004E581F /* DoubtTests.swift */; };
D4AAE5401B5AE2D0004E581F /* Array.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4AAE5351B5AE2D0004E581F /* Array.swift */; };
D4AAE5411B5AE2D0004E581F /* Diff.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4AAE5361B5AE2D0004E581F /* Diff.swift */; };
D4AAE5421B5AE2D0004E581F /* Doc.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4AAE5371B5AE2D0004E581F /* Doc.swift */; };
@ -38,6 +38,7 @@
/* Begin PBXFileReference section */
D40024EB1BAC62BA00A110B8 /* Swift.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Swift.swift; sourceTree = "<group>"; };
D40024ED1BAC819000A110B8 /* SwiftTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftTests.swift; sourceTree = "<group>"; };
D432D4701BA9AC0B00F3FABC /* DiffTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DiffTests.swift; sourceTree = "<group>"; };
D432D4721BA9C55300F3FABC /* Stream.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Stream.swift; sourceTree = "<group>"; };
D432D4741BA9D6A400F3FABC /* Memo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Memo.swift; sourceTree = "<group>"; };
@ -45,7 +46,6 @@
D4AAE4FD1B5AE22E004E581F /* Doubt.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Doubt.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D4AAE5011B5AE22E004E581F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
D4AAE50D1B5AE22E004E581F /* DoubtTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DoubtTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
D4AAE5121B5AE22E004E581F /* DoubtTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DoubtTests.swift; sourceTree = "<group>"; };
D4AAE5141B5AE22E004E581F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
D4AAE5351B5AE2D0004E581F /* Array.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Array.swift; sourceTree = "<group>"; };
D4AAE5361B5AE2D0004E581F /* Diff.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Diff.swift; sourceTree = "<group>"; };
@ -129,8 +129,8 @@
D4AAE5111B5AE22E004E581F /* DoubtTests */ = {
isa = PBXGroup;
children = (
D4AAE5121B5AE22E004E581F /* DoubtTests.swift */,
D432D4701BA9AC0B00F3FABC /* DiffTests.swift */,
D40024ED1BAC819000A110B8 /* SwiftTests.swift */,
D4AAE5141B5AE22E004E581F /* Info.plist */,
);
path = DoubtTests;
@ -264,8 +264,8 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D40024EE1BAC819000A110B8 /* SwiftTests.swift in Sources */,
D432D4711BA9AC0B00F3FABC /* DiffTests.swift in Sources */,
D4AAE5131B5AE22E004E581F /* DoubtTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

View File

@ -1,11 +0,0 @@
final class DoubtTests: XCTestCase {
func testEqualSyntaxResultsInRecursivelyCopyingDiff() {
if let s = sexpr("\t(\n( a) \n)\t")?.value, t = sexpr("((a))")?.value {
XCTAssertEqual(Diff(s, t), Diff.Copy(.Apply(.Copy(.Apply(.Copy(.Variable("a")), [])), [])))
}
}
}
@testable import Doubt
import XCTest

View File

@ -0,0 +1,9 @@
final class SwiftTests: XCTestCase {
func testKeyValueAcceptsAlphabeticKeysAndValues() {
XCTAssertEqual(Swift.Parsers.keyValue("key=value")?.value, .KeyValue("key", "value"))
}
}
@testable import Doubt
import XCTest