Skip to content

Scanner test not testing multiline strings properly #63

@alexschneider

Description

@alexschneider

Anywhere we test a multiline string, though the string appear to be multiline, coffeescript turns it into a single line string when compiled.

See https://github.com/alexschneider/teascript/blob/master/test/scanner/line_scanner/string_literals_spec.coffee#L30-L31 for example.

I'm not sure the best way to fix this, because adding a linebreak simply adds a linebreak token in coffeescript, it doesn't actually emulate a multiline string being passed in... @rachelriv, do you mind taking a look?

Also, to further illustrate what I'm talking about:

$ echo console.log \'test\\ntest\' > test.coffee && coffee test.coffee
test test
$ cat test.coffee
console.log 'test
test'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions