inspirer / textmapper

Lexer and Parser generator
http://textmapper.org
MIT License
107 stars 23 forks source link

tm-parsers/js/js.tm: test case failing with "The on-disk content differs from the generated one" #37

Closed mewmew closed 3 years ago

mewmew commented 4 years ago

I just synced with the latest revision of textmapper (4d45f61c212e901879fe0ca7c04bd44cdd005d7e), and when running go test ./..., I got the following error:

u@x220 ~/g/s/g/i/textmapper> go test ./...
?       github.com/inspirer/textmapper/tm-go/cmd/textmapper [no test files]
--- FAIL: TestGenerate (0.40s)
    --- FAIL: TestGenerate/../../tm-parsers/js/js.tm (0.31s)
        gen_test.go:45: The on-disk content differs from the generated one.
            --- ../../tm-parsers/js/lexer_tables.go
            +++ lexer_tables.go (generated)
            @@ -304,12 +304,18 @@
                    54, 54, 54, 54, 54, 54, 57,
                }},
                {3664, 3674, 59, nil},
            -   {3713, 3802, 59, []uint8{
            -       54, 54, 1, 54, 1, 1, 54, 54, 1, 54, 1, 1, 54, 1, 1, 1, 1, 1, 1, 54, 54, 54,
            -       54, 1, 54, 54, 54, 54, 54, 54, 54, 1, 54, 54, 54, 1, 54, 1, 54, 1, 1, 54,
...
mewmew commented 3 years ago

Fixed on rev b44d6a3632e48a46c41cffce1eea5bff72d7d655.

$ go test -count=1 ./...
?       github.com/inspirer/textmapper/tm-go/cmd/textmapper [no test files]
ok      github.com/inspirer/textmapper/tm-go/gen    0.321s
ok      github.com/inspirer/textmapper/tm-go/grammar    0.018s
ok      github.com/inspirer/textmapper/tm-go/lalr   0.003s
ok      github.com/inspirer/textmapper/tm-go/lex    0.011s
?       github.com/inspirer/textmapper/tm-go/parsers    [no test files]
ok      github.com/inspirer/textmapper/tm-go/parsers/json   0.029s
?       github.com/inspirer/textmapper/tm-go/parsers/simple [no test files]
ok      github.com/inspirer/textmapper/tm-go/parsers/test   0.023s
?       github.com/inspirer/textmapper/tm-go/parsers/test/ast   [no test files]
?       github.com/inspirer/textmapper/tm-go/parsers/test/selector  [no test files]
ok      github.com/inspirer/textmapper/tm-go/status 0.036s
ok      github.com/inspirer/textmapper/tm-go/syntax 0.006s
ok      github.com/inspirer/textmapper/tm-go/util/container 0.003s
ok      github.com/inspirer/textmapper/tm-go/util/diff  0.025s
ok      github.com/inspirer/textmapper/tm-go/util/dump  0.006s
ok      github.com/inspirer/textmapper/tm-go/util/graph 0.005s
ok      github.com/inspirer/textmapper/tm-go/util/ident 0.003s
ok      github.com/inspirer/textmapper/tm-go/util/set   0.003s
ok      github.com/inspirer/textmapper/tm-parsers/js    0.008s
?       github.com/inspirer/textmapper/tm-parsers/js/ast    [no test files]
?       github.com/inspirer/textmapper/tm-parsers/js/selector   [no test files]
ok      github.com/inspirer/textmapper/tm-parsers/parsertest    0.002s
ok      github.com/inspirer/textmapper/tm-parsers/tm    0.036s
ok      github.com/inspirer/textmapper/tm-parsers/tm/ast    0.001s
?       github.com/inspirer/textmapper/tm-parsers/tm/selector   [no test files]