Sha256: c303cac966e0825dabac0939a94fbd0127ce711214c84a5e618c290b7d1e745f
Contents?: true
Size: 1.6 KB
Versions: 148
Compression:
Stored size: 1.6 KB
Contents
import org.scalatest.{FunSuite, Matchers} import Sgf._ /** @version created manually **/ class SgfTest extends FunSuite with Matchers { test("parse \"\"") { Sgf.parseSgf("") should be (None) } test("parse \"()\"") { pending Sgf.parseSgf("()") should be (None) } test("parse \";\"") { pending Sgf.parseSgf(";") should be (None) } test("parse \"(;)\"") { pending Sgf.parseSgf("(;)") should be (Some(Node(Map()))) } test("parse \"(;A[B])\"") { pending Sgf.parseSgf("(;A[B])") should be (Some(Node(Map("A" -> List("B"))))) } test("parse \"(;a)\"") { pending Sgf.parseSgf("(;a)") should be (None) } test("parse \"(;a[b])\"") { pending Sgf.parseSgf("(;a[b])") should be (None) } test("parse \"(;Aa[b])\"") { pending Sgf.parseSgf("(;Aa[b])") should be (None) } test("parse \"(;A[B];B[C])\"") { pending Sgf.parseSgf("(;A[B];B[C])") should be ( Some(Node(Map("A" -> List("B")), List(Node(Map("B" -> List("C"))))))) } test("parse \"(;A[B](;B[C])(;C[D]))\"") { pending Sgf.parseSgf("(;A[B](;B[C])(;C[D]))") should be ( Some(Node(Map("A" -> List("B")), List(Node(Map("B" -> List("C"))), Node(Map("C" -> List("D"))))))) } test("parse \"(;A[b][c][d])\"") { pending Sgf.parseSgf("(;A[b][c][d])") should be (Some(Node(Map("A" -> List("b", "c", "d"))))) } test("""parse "(;A[\\]b\nc\\\nd\t\te\\\\ \\\n\\]])"""") { pending Sgf.parseSgf("(;A[\\]b\nc\\\nd\t\te\\\\ \\\n\\]])") should be ( Some(Node(Map("A" -> List("]b cd e\\ ]"))))) } }
Version data entries
148 entries across 148 versions & 1 rubygems