This repository was archived by the owner on Dec 17, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +25
-7
lines changed Expand file tree Collapse file tree 3 files changed +25
-7
lines changed Original file line number Diff line number Diff line change @@ -31,14 +31,24 @@ the command has been added to the command-queue of the thread.
3131Since this project was originally an Erlang package, I chose to maintain the
3232original module name (as an alias) and it's tests to try to maintain
3333backwards compatibility. By default these tests get ran by default.
34- ` mix test ` will execute them.
34+
35+ ``` bash
36+ # All the tests without the bench marks.
37+ mix test
38+
39+ # Run only erlang tests.
40+ mix test --only esqlite_erlang
41+ ```
3542
3643# Benchmarks
3744There is also a benchmark suite located in the ` bench ` directory.
3845It does not get ran with the test suite since it can take quite a while.
39- You can run the benchmarks with
46+
4047``` bash
48+ # run all the tests and the benchmarks.
4149mix test --include bench
50+ # run just the benchmark with
51+ mix test bench --include bench
4252```
4353
4454# Thanks and License
Original file line number Diff line number Diff line change 1+ defmodule EsqliteErlangTest do
2+ use ExUnit.Case
3+ import ExUnit.CaptureIO
4+
5+ @ tag :esqlite_erlang
6+ test "Runs Erlang tests" do
7+ assert Code . ensure_loaded? ( :esqlite_test )
8+ output = capture_io ( & :esqlite_test . test / 0 )
9+ unless output =~ "tests pass" do
10+ flunk ( output )
11+ end
12+ end
13+ end
Original file line number Diff line number Diff line change 1- :code . ensure_loaded ( :esqlite_test )
2- case :esqlite_test . test ( ) do
3- :error -> System . halt ( 1 )
4- other -> other
5- end
You can’t perform that action at this time.
0 commit comments