Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add a test not to interpret strings as lists #43

Open
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
Contributor

cjerdonek commented Apr 8, 2012

In Python, for example (as in many other languages undoubtedly), strings are sequence types that share many of the same properties as lists and other iterator types:

http://docs.python.org/library/stdtypes.html#sequence-types-str-unicode-list-tuple-bytearray-buffer-xrange

It would be good to add a test for this. One does not seem to exist yet in the spec (incidental or not).

@cjerdonek cjerdonek Added to sections.yml a test that strings should not be interpreted a…
…s lists.

In Python, for example, strings are sequence types that share many of the
same properties as lists and other iterator types:

  http://docs.python.org/library/stdtypes.html#sequence-types-str-unicode-list-tuple-bytearray-buffer-xrange

A test for this does not yet exist in the spec (incidental or not).
be426fe
Member

bobthecow commented Apr 11, 2012

In Ruby 1.8.x, strings are Enumerable by line, so treating 123 as a list would still pass this test case. If you change the value to 123\n456 that should cover this case as well.

@cjerdonek cjerdonek added a commit to cjerdonek/mustache-spec that referenced this pull request May 3, 2012

@cjerdonek cjerdonek Merge remote-tracking branch 'v1.0.3+section-strings-not-lists' into …
…development

See issue #43: mustache#43
e3f4155
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment