diff --git a/lexers/testdata/http.actual b/lexers/testdata/http.actual new file mode 100644 index 0000000..aadc007 --- /dev/null +++ b/lexers/testdata/http.actual @@ -0,0 +1,5 @@ +GET /foo HTTP/1.1 +Content-Type: application/json +User-Agent: foo + +{"hello": "world"} diff --git a/lexers/testdata/http.expected b/lexers/testdata/http.expected new file mode 100644 index 0000000..82fb269 --- /dev/null +++ b/lexers/testdata/http.expected @@ -0,0 +1,27 @@ +[ + {"type":"NameFunction","value":"GET"}, + {"type":"Text","value":" "}, + {"type":"NameNamespace","value":"/foo"}, + {"type":"Text","value":" "}, + {"type":"KeywordReserved","value":"HTTP"}, + {"type":"Operator","value":"/"}, + {"type":"LiteralNumber","value":"1.1"}, + {"type":"Text","value":"\n"}, + {"type":"Name","value":"Content-Type"}, + {"type":"Operator","value":":"}, + {"type":"Text","value":" "}, + {"type":"Literal","value":"application/json"}, + {"type":"Text","value":"\n"}, + {"type":"Name","value":"User-Agent"}, + {"type":"Operator","value":":"}, + {"type":"Text","value":" "}, + {"type":"Literal","value":"foo"}, + {"type":"Text","value":"\n\n"}, + {"type":"Punctuation","value":"{"}, + {"type":"NameTag","value":"\"hello\""}, + {"type":"Punctuation","value":":"}, + {"type":"Text","value":" "}, + {"type":"LiteralStringDouble","value":"\"world\""}, + {"type":"Punctuation","value":"}"}, + {"type":"Text","value":"\n"} +]