<commit_before>Goal
====

Practice using git like a pro, or as described
[by cbeams](http://chris.beams.io/posts/git-commit/).


Idea
====

Write a PostScript unit test framework.


Example
=======

Code under test in file "readme-code.ps":

    /return-one 1 def
    /return-two 1 def

Test in file "readme-test.ps":

    (pstest.ps) runlibfile
    (readme-code.ps) run

    (Snippets for the Readme) test-case

    (return-one) should
    (return 1)
    return-one 1 assert-equal

    (return-two) should
    (return 2)
    return-two 2 assert-equal

    test-summary

Output in file "readme-expected.out":

    Snippets for the Readme
    .F
    --------------------------------------------------
    2 tests, 1 failed

    return-two
      should return 2
        expected: 2
        actual:   1


Todo
====

* Start documentation of structure and assertions in readme
* Extend `test-this` to find tests by convention
* Add test for `util.ps: inc`
* Pull out test failed / test passed
* Don't output current object twice if two tests fail for it
* Create shell script wrapper for convenience
* Add `assert-true`, `assert-false`
* Add verbose mode: show specs while they are tested
* Add `assert-not-equal`
* Add `assert-not-empty`
* Add `assert-contains`
* Add `assert-not-contains`
* Add `assert-deep-equal`
* Add `assert-almost-equal`
* Add `assert-deep-almost-equal`<commit_msg>Add to todo list items around publishing on github<commit_after>Goal
====

Practice using git like a pro, or as described
[by cbeams](http://chris.beams.io/posts/git-commit/).


Idea
====

Write a PostScript unit test framework.


Example
=======

Code under test in file "readme-code.ps":

    /return-one 1 def
    /return-two 1 def

Test in file "readme-test.ps":

    (pstest.ps) runlibfile
    (readme-code.ps) run

    (Snippets for the Readme) test-case

    (return-one) should
    (return 1)
    return-one 1 assert-equal

    (return-two) should
    (return 2)
    return-two 2 assert-equal

    test-summary

Output in file "readme-expected.out":

    Snippets for the Readme
    .F
    --------------------------------------------------
    2 tests, 1 failed

    return-two
      should return 2
        expected: 2
        actual:   1


Todo
====

* Start documentation of structure and assertions in readme
* Add disclaimer ('do not use')
* Publish on github
* Convert this todo list to issues on github?
* Add test for `util.ps`, i.e. `inc`
* Extend `test-this` to find tests by convention
* Pull out test failed / test passed
* Don't output current object twice if two tests fail for it
* Create shell script wrapper for convenience
* Add `assert-true`, `assert-false`
* Add verbose mode: show specs while they are tested
* Add `assert-not-equal`
* Add `assert-not-empty`
* Add `assert-contains`
* Add `assert-not-contains`
* Add `assert-deep-equal`
* Add `assert-almost-equal`
* Add `assert-deep-almost-equal`
{'fraction_non_alphanumeric': 0.13942307692307693, 'fraction_numerical': 0.007554945054945055, 'mean_word_length': 2.636704119850187, 'pattern_counts': {'":': 6, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '844551', 'n_tokens_mistral': 958, 'n_tokens_neox': 893, 'n_words': 326}