BurntSushi/toml-test — pull request #10 by shamrin (2013-10-07 22:08:59+00:00)
Title: Simple runner

Introducing simple test runner that doesn't require anything that is not already installed in modern Mac, Linux, FreeBSD etc (Bash and Python). It's silent on successful tests, and outputs `diff -u` on failures.

I would suggest recommending this runner for those people who want to incorporate your test suite in their repositories.

Here's the result of running against [uiri/toml](https://github.com/uiri/toml):

```
./runtests ../toml/toml-test.py
--- tests/valid/table-array-implicit.json
+++ got
@@ -1 +1 @@
-{"albums": {"songs": [{"name": {"type": "string", "value": "Glory Days"}}]}}
+{"albums": {"songs": {"type": "array", "value": [{"name": {"type": "string", "value": "Glory Days"}}]}}}
--- tests/valid/table-array-many.json
+++ got
@@ -1 +1 @@
-{"people": [{"first_name": {"type": "string", "value": "Bruce"}, "last_name": {"type": "string", "value": "Springsteen"}}, {"first_name": {"type": "string", "value": "Eric"}, "last_name": {"type": "string", "value": "Clapton"}}, {"first_name": {"type": "string", "value": "Bob"}, "last_name": {"type": "string", "value": "Seger"}}]}
+{"people": {"type": "array", "value": [{"first_name": {"type": "string", "value": "Bob"}, "last_name": {"type": "string", "value": "Seger"}}, {"first_name": {"type": "string", "value": "Eric"}, "last_name": {"type": "string", "value": "Clapton"}}, {"first_name": {"type": "string", "value": "Bruce"}, "last_name": {"type": "string", "value": "Springsteen"}}]}}
--- tests/valid/table-array-nest.json
+++ got
@@ -1 +1 @@
-{"albums": [{"name": {"type": "string", "value": "Born to Run"}, "songs": [{"name": {"type": "string", "value": "Jungleland"}}, {"name": {"type": "string", "value": "Meeting Across the River"}}]}, {"name": {"type": "string", "value": "Born in the USA"}, "songs": [{"name": {"type": "string", "value": "Glory Days"}}, {"name": {"type": "string", "value": "Dancing in the Dark"}}]}]}
+{"albums": {"type": "array", "value": [{"name": {"type": "string", "value": "Born in the USA"}, "songs": {"type": "array", "value": [{"name": {"type": "string", "value": "Dancing in the Dark"}}]}}, {"name": {"type": "string", "value": "Born to Run"}, "songs": {"type": "array", "value": [{"name": {"type": "string", "value": "Meeting Across the River"}}]}}]}}
--- tests/valid/table-array-one.json
+++ got
@@ -1 +1 @@
-{"people": [{"first_name": {"type": "string", "value": "Bruce"}, "last_name": {"type": "string", "value": "Springsteen"}}]}
+{"people": {"type": "array", "value": [{"first_name": {"type": "string", "value": "Bruce"}, "last_name": {"type": "string", "value": "Springsteen"}}]}}
```