Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic lucius test cases at rules charset #49

Merged
merged 7 commits into from
Aug 28, 2021

Conversation

isao-takejib
Copy link
Contributor

@isao-takejib isao-takejib commented Aug 21, 2021

Related #48

  • Fix css.tmLanguage.json so that @charset can be tested even if it contains a header line for testing.
  • However, if there is a blank line, the test will fail. (Changes)
    • fail
      // SYNTAX TEST "source.yesod.lucius" "at-charset"
      
      @charset "utf-8";
      // <-  meta.at-rule.charset.css keyword.control.at-rule.charset.css punctuation.definition.keyword.css
      // <~-------  meta.at-rule.charset.css keyword.control.at-rule.charset.css
      // <~~~~~~~~~-  meta.at-rule.charset.css string.quoted.double.css punctuation.definition.string.begin.css
      // <~~~~~~~~~~-----  meta.at-rule.charset.css string.quoted.double.css
      // <~~~~~~~~~~~~~~~-  meta.at-rule.charset.css string.quoted.double.css punctuation.definition.string.end.css
      // <~~~~~~~~~~~~~~~~-  meta.at-rule.charset.css punctuation.terminator.rule.css
      
    • success
      // SYNTAX TEST "source.yesod.lucius" "at-charset"
      @charset "utf-8";
      // <-  meta.at-rule.charset.css keyword.control.at-rule.charset.css punctuation.definition.keyword.css
      // <~-------  meta.at-rule.charset.css keyword.control.at-rule.charset.css
      // <~~~~~~~~~-  meta.at-rule.charset.css string.quoted.double.css punctuation.definition.string.begin.css
      // <~~~~~~~~~~-----  meta.at-rule.charset.css string.quoted.double.css
      // <~~~~~~~~~~~~~~~-  meta.at-rule.charset.css string.quoted.double.css punctuation.definition.string.end.css
      // <~~~~~~~~~~~~~~~~-  meta.at-rule.charset.css punctuation.terminator.rule.css
      

@isao-takejib
Copy link
Contributor Author

// SYNTAX TEST "source.yesod.lucius" "at-charset"

@charset "utf-8";
// <-  meta.at-rule.charset.css keyword.control.at-rule.charset.css punctuation.definition.keyword.css
// <~-------  meta.at-rule.charset.css keyword.control.at-rule.charset.css
// <~~~~~~~~~-  meta.at-rule.charset.css string.quoted.double.css punctuation.definition.string.begin.css
// <~~~~~~~~~~-----  meta.at-rule.charset.css string.quoted.double.css
// <~~~~~~~~~~~~~~~-  meta.at-rule.charset.css string.quoted.double.css punctuation.definition.string.end.css
// <~~~~~~~~~~~~~~~~-  meta.at-rule.charset.css punctuation.terminator.rule.css

The reasons why the test cases were failing are as follows.

  • The test starts from the next line of the header line. In the example above, the test starts from the second blank line.
  • However, the test fails because there is a string (a newline character) preceding the @charset.

Therefore, the test failure in this example is a correct behavior.

@isao-takejib isao-takejib marked this pull request as ready for review August 28, 2021 05:56
@isao-takejib isao-takejib requested a review from waddlaw August 28, 2021 05:56
@isao-takejib isao-takejib mentioned this pull request Aug 28, 2021
@waddlaw waddlaw merged commit 054d32a into master Aug 28, 2021
@waddlaw waddlaw deleted the basic_lucius_test_cases_at-rules_charset branch August 28, 2021 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants