Small project to get started with Scala and ScalaTest.
$ sbt "run -c 3 -l 2 -w 5 -s 2 -f 1"
Result:
a b c
aa bb cc
aa bb aa bb
aa: 2 bb: 2 cc: 1
a b c
aa aa aa
aa: 3 bb: 2
aa: 4 bb: 1
$ sbt test
or
$ sbt coverage test coverageReport
to see the code coverage percentages of your test suite.
Result:
[info] Statement coverage.: 24.60%
[info] Branch coverage....: 52.63%
To speed up the edit-compile-test/run cycle, you can start sbt without arguments
$ sbt
and repeatedly run individual tasks
sbt> run -c 3 -l 2 -w 5 -s 2 -f 1
sbt> test
To exit sbt, enter
sbt> exit
This lets you use your application on the command-line.
First, create the startup script:
sbt stage
Then run outside of sbt like this:
./target/universal/stage/bin/hello-scalatest-scala
or you can run it by passing the a .txt file to read from it. This command will use the default parameters.
./target/universal/stage/bin/scalatest < lesmisrables01unkngoog_djvu.txt
Add the ignore file to it.
./target/universal/stage/bin/scalatest -i ignore.txt < lesmisrables01unkngoog_djvu.txt
On Windows, you might need backslashes. WSL (Windows Subsystem for Linux) recommended instead.