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

lexers: move to comparing bytes in tests #856

Merged
merged 3 commits into from
Sep 21, 2023

Commits on Sep 21, 2023

  1. test: fix up writing up float scores with trailing newlines

    This ensures we consistently write a trailing newline when RECORD=true
    is set.
    myitcv committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    b34c39b View commit details
    Browse the repository at this point in the history
  2. lexers: update expected files using proper newlines

    This is the mechanical result of running:
    
        RECORD=true go test ./lexers
    myitcv committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    b04a0ea View commit details
    Browse the repository at this point in the history
  3. Assert lexer tests based on equality of byte encodings

    This helps to ensure that running RECORD=true go test ./lexers on a
    given commit for which the tests pass will not result in any changes in
    the working tree.
    
    Notes that as a result of this change, the following command results in
    a clean working tree:
    
        RECORD=true go test ./lexers
    
    Fixes alecthomas#855
    myitcv committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    53e71f9 View commit details
    Browse the repository at this point in the history