Skip to content

Commit

Permalink
add pgn parser test
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed May 31, 2016
1 parent 14039ec commit cbf5494
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/test/scala/format/pgn/ParserTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,15 @@ class ParserTest extends ChessTest {
}
}

"first move variation" in {
parser("1. e4 (1. d4)") must beSuccess.like {
case ParsedPgn(_, _, List(san)) =>
san.metas.variations.headOption must beSome.like {
case variation => variation must haveSize(1)
}
}
}

raws foreach { sans =>
val size = sans.split(' ').size
"sans only size: " + size in {
Expand Down

0 comments on commit cbf5494

Please sign in to comment.