<commit_before>= Asciidoctor::DocTest
<NAME> <https://github.com/jirutka[@jirutka]>
:source-language: ruby
// custom
:gem-name: asciidoctor-doctest
:gem-version: 2.0.0.beta.6
:gh-name: asciidoctor/{gem-name}
:gh-branch: master
:badge-style: flat
:doctor-man-uri: http://asciidoctor.org/docs/user-manual
:rawgit-base: https://cdn.rawgit.com/{gh-name}/master
:src-base: lib/asciidoctor/doctest

image:https://img.shields.io/travis/{gh-name}/{gh-branch}.svg?style={badge-style}[Build Status, link="https://travis-ci.org/{gh-name}"]
image:https://img.shields.io/codeclimate/coverage/github/{gh-name}.svg?style={badge-style}[Test Coverage, link="https://codeclimate.com/github/{gh-name}"]
image:https://img.shields.io/codeclimate/github/{gh-name}.svg?style={badge-style}[Code Climate, link="https://codeclimate.com/github/{gh-name}"]
image:https://inch-ci.org/github/{gh-name}.svg?branch={gh-branch}&style={badge-style}[Inline docs, link="http://inch-ci.org/github/{gh-name}"]
image:https://img.shields.io/badge/yard-docs-blue.svg?style={badge-style}[Yard Docs, link="http://www.rubydoc.info/github/{gh-name}/frames"]

DocTest is a tool for end-to-end testing of Asciidoctor _backends_ based on comparing of textual output.

It provides a collection of categorized <<input-examples, input _examples_>> (documents in AsciiDoc syntax) to simplify and systematize writing tests for new backends.
You just write or <<generate-examples, generate>> the expected output, i.e. what the backend should produce for the given input.

image::{rawgit-base}/doc/img/doctest-diag.svg[diagram, align="center"]

Each example should be focused on one use case, so when writing a new backend, you can incrementally implement new features following the reference input examples.
However, they are not strictly isolated like unit tests.
For example, if you change a format of a paragraph, it may affect a variety of other examples.

When test fails, DocTest prints a nicely formatted diff of the expected and actual output (see <<run-tests>>), so you see exactly what went wrong.<commit_msg>Readme: Replace shields.io badges with genuine ones<commit_after>= Asciidoctor::DocTest
<NAME> <https://github.com/jirutka[@jirutka]>
:source-language: ruby
// custom
:gem-name: asciidoctor-doctest
:gem-version: 2.0.0.beta.6
:gh-name: asciidoctor/{gem-name}
:gh-branch: master
:codeclimate-id: fa264b72eeeacd2e86df
:doctor-man-uri: http://asciidoctor.org/docs/user-manual
:rawgit-base: https://cdn.rawgit.com/{gh-name}/master
:src-base: lib/asciidoctor/doctest

image:https://travis-ci.org/{gh-name}.svg?branch={gh-branch}[Build Status, link="https://travis-ci.org/{gh-name}"]
image:https://api.codeclimate.com/v1/badges/{codeclimate-id}/test_coverage[Test Coverage, link="https://codeclimate.com/github/{gh-name}/test_coverage"]
image:https://api.codeclimate.com/v1/badges/{codeclimate-id}/maintainability[Maintainability, link="https://codeclimate.com/github/{gh-name}/maintainability"]
image:https://inch-ci.org/github/{gh-name}.svg?branch={gh-branch}[Inline docs, link="http://inch-ci.org/github/{gh-name}"]
image:https://img.shields.io/badge/yard-docs-blue.svg[Yard Docs, link="http://www.rubydoc.info/github/{gh-name}/frames"]

DocTest is a tool for end-to-end testing of Asciidoctor _backends_ based on comparing of textual output.

It provides a collection of categorized <<input-examples, input _examples_>> (documents in AsciiDoc syntax) to simplify and systematize writing tests for new backends.
You just write or <<generate-examples, generate>> the expected output, i.e. what the backend should produce for the given input.

image::{rawgit-base}/doc/img/doctest-diag.svg[diagram, align="center"]

Each example should be focused on one use case, so when writing a new backend, you can incrementally implement new features following the reference input examples.
However, they are not strictly isolated like unit tests.
For example, if you change a format of a paragraph, it may affect a variety of other examples.

When test fails, DocTest prints a nicely formatted diff of the expected and actual output (see <<run-tests>>), so you see exactly what went wrong.
{'fraction_non_alphanumeric': 0.14258095698405027, 'fraction_numerical': 0.0043499275012083135, 'mean_word_length': 5.397217928902627, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 20, 'lorem ipsum': 0, 'www.': 2, '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': '1615762', 'n_tokens_mistral': 1359, 'n_tokens_neox': 1324, 'n_words': 352}