From e21bd2717380e8afaefd6bb3fa46ee3827cffa5e Mon Sep 17 00:00:00 2001 From: Tomasz Rybarczyk Date: Sun, 21 Oct 2018 03:32:06 +0200 Subject: [PATCH] README: Add "Testing" section --- README.md | 14 +++++++++++--- bin/test.sh | 4 ++++ bower.json | 3 ++- package.json | 3 +++ 4 files changed, 20 insertions(+), 4 deletions(-) create mode 100755 bin/test.sh diff --git a/README.md b/README.md index 5f9c88b..0f1a050 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,17 @@ run = do ``` +## Testing + +Currently tests are prepared to work with default and local setup for postgresql (ident authentication, standart port etc.). +If you think that we should add configuration layer for our test runner please open an issue. +To run suite: + + * prepare empty "purspg" database + + * `$ nmp install literate-purescript` + + * `$ ./bin/test.sh` ## Generating SQL Queries @@ -85,6 +96,3 @@ generator instead of a preprocessor, and easier to use. [sqltopurs]: https://github.com/rightfold/sqltopurs -## Testing - -To run tests you have to prepare "purspg" database and use standard command: `pulp test`. diff --git a/bin/test.sh b/bin/test.sh new file mode 100755 index 0000000..72c937b --- /dev/null +++ b/bin/test.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +litps compile --file README.md; mv README.purs test/Guide.purs; pulp test --main Test.Main + diff --git a/bower.json b/bower.json index 40bc26f..716b479 100644 --- a/bower.json +++ b/bower.json @@ -20,7 +20,8 @@ "purescript-decimals": "^4.0.0", "purescript-js-date": "^6.0.0", "purescript-foreign-object": "^1.0.0", - "purescript-foreign-generic": "^7.0.0" + "purescript-foreign-generic": "^7.0.0", + "purescript-tuples": "^5.0.0" }, "repository": { "type": "git", diff --git a/package.json b/package.json index a85d799..053287c 100644 --- a/package.json +++ b/package.json @@ -7,5 +7,8 @@ "global": "^4.3.2", "pg": "^6.1.2", "pulp": "^12.3.0" + }, + "devDependencies": { + "literate-purescript": "^0.1.2" } }