Spec tests for non-alphabetical partial names #58

Open
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants

sartak commented Oct 5, 2012

from specs/partials.yml: "The tag's content MUST be a non-whitespace character sequence NOT containing the current closing delimiter."

I added spec tests for partial names that include a number, hyphen, underscore, period, forward slash, colon, tilde, caret.

groue commented Oct 5, 2012

Thanks for the contribution!

There are three tests that I think you should remove. They are related to the unspecified topic of the relationships between partials and the file system:

sartak/spec@ee331c6#L0R133 deals with file extensions:

+  - name: Partial names: period
+    desc: Partial names can include periods
+    data: { text: 'content' }
+    template: '"{{>partial.name}}"'
+    partials: { 'partial.name': '*{{text}}*' }
+    expected: '"*content*"'

sartak/spec@ee331c6#L0R143 deals with file directory hierarchies:

+  - name: Partial names: forward slash
+    desc: Partial names can include forward slashes
+    data: { text: 'content' }
+    template: '"{{>partial/name}}"'
+    partials: { 'partial/name': '*{{text}}*' }
+    expected: '"*content*"'

sartak/spec@ee331c6#L0R154 deals with the tilde, symbol of the home directory of a user in a Unix system:

+  - name: Partial names: tilde
+    desc: Partial names can include tildes
+    data: { text: 'content' }
+    template: '"{{>partial~name}}"'
+    partials: { 'partial~name': '*{{text}}*' }
+    expected: '"*content*"'

For a non-exhaustive reference of research on the subject made by other people:

Until this topic gets some clarification, I believe those tests should be removed from this pull request.

What do you think?

@sartak sartak Spec tests for partial names
    "The tag's content MUST be a non-whitespace character sequence
    NOT containing the current closing delimiter."

    I explicitly excluded tests for period, forward slash, and tilde
    at Gwendal Roué's suggestion.
66a3526

sartak commented Oct 5, 2012

Hi Gwendal,

I removed the tests for period, forward slash, and tilde. I don't want this pull request to block on those discussions either, yeah :)

I amended my commit (it's now 66a3526); it looks like github got the metadata on that right.

Cheers,
Shawn

groue commented Oct 5, 2012

Cool :-) Now let's wait for @pvande, the repo maintainer. I hope he merges your commit it :)

ping @pvande

What do you guys think of moving the mustache spec to be much more like handlebars, but that will of course work server side also?

Also, based on participation, @groue should be allowed as a maintainer for the spec, out of everyone he clearly cares the most about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment