Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ircdocs/parser-tests
Tests for IRC Parsers
https://github.com/ircdocs/parser-tests
irc irc-protocol
Last synced: 3 months ago
JSON representation
Tests for IRC Parsers
- Host: GitHub
- URL: https://github.com/ircdocs/parser-tests
- Owner: ircdocs
- License: cc0-1.0
- Created: 2015-06-22T05:14:19.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-05-29T12:56:18.000Z (over 1 year ago)
- Last Synced: 2024-09-23T21:39:47.383Z (4 months ago)
- Topics: irc, irc-protocol
- Language: Go
- Size: 63.5 KB
- Stars: 39
- Watchers: 8
- Forks: 9
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-irc - IRC Parser Tests - A CC0 set of test suites, to ensure IRC message parsers are consistent. (Uncategorized / Uncategorized)
README
# IRC Parser Tests
Various tests for IRC parsers so people can check to ensure they're consistent. These tests are based on existing test suites and widespread client behaviour.
**Note:** This is still being written. Feel free to suggest or contribute tests - PRs are welcomed!
## Testing
There are two included tests used to test these vectors, the Python and Golang programs.
### Using the python library
Either `pip install irc_parser_tests` or add `irc_parser_tests` to your `requirements.txt`. The test data is available in the module `parser_tests`.### Releasing a new python version
1. Bump the version identifier in `parser_tests/__init__.py`
2. Commit the version bump and tag it `git tag v`
3. Push to master
4. Github actions will deploy to PyPi### Python
The `test.py` script uses the [girc](https://github.com/DanielOaks/girc) and [ircmatch](https://github.com/mammon-ircd/ircmatch>) libraries as reference implementations, as well as [pyyaml](http://pyyaml.org/) to parse the test files.
To install these libraries, run:
pip3 install --upgrade girc ircmatch pyyaml
After that, simply run the script with `python3 test.py` in the root dir. This will test everything we can test, and show the output.
### Go
The `test.go` script uses the [girc-go](https://github.com/DanielOaks/girc-go) packages as reference implementations.
To install these packages, run:
go get -u ./...
After that, simply run the script with `go run test.go run` in the root dir. This will test everything we can test, and show the output.
## Sources
Thanks to these sources for having open tests and/or agreeing to let me include your tests here!
Some tests originate from [Mozilla's test vectors](https://dxr.mozilla.org/comm-central/source/chat/protocols/irc/test/test_ircMessage.js), which are public domain.
Some tests originate from [grawity's test vectors](https://github.com/grawity/irc-parse-tests) which were WTFPL v2 licensed when they were retrieved.
Some tests originate from [Sadie's test vectors](https://github.com/SadieCat/ircparser-ruby/tree/master/test) which she's indicated I'm free to include here.