Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

Add unit tests to the templates #40

Open
piojo-zz opened this issue May 20, 2014 · 0 comments
Open

Add unit tests to the templates #40

piojo-zz opened this issue May 20, 2014 · 0 comments

Comments

@piojo-zz
Copy link
Contributor

We want to test how these templates render.

For now, we'll do single-line regexp-based tests. We propose to have the following structure for each service:

  • $tt_root/$service/
    • TT files come here.
    • pan
      Contains at least schema.pan.
    • test/
      • profiles/
        Contains test profiles for this service. The data we feed to
        the file starts from "/metaconfig" in the profile, for simplicity.
      • regexps/
        Contains the regular expressions the rendered TT file for each
        profile should match. For each profile we'll have either:
        • A single file with the same name of that profile.
        • A directory containing all the regular expression files for
          that profile. The name of the directory must be the same of
          the profile, and the names of the files is free.

Then, each regexp file file will have a description header, a separator and one regexp per line, like this.

description

---
flag1
flag2
(not, case-insensitive, other?...)

---
regexp1
regexp2
...

All sections are mandatory, but can be empty.

We'll package only the .tt files and the json2tt script for
development and debugging purposes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant