Add test case for the `|` token in Journey scanner
Journey's scanner tokenizes the `|` (:OR) operator when scanning route urls such as `"/:foo|*bar"`. However, the current scanner test does not have any test cases for the `|` operator. This commit adds a test case for this particular token.
This commit is contained in:
parent
c47c289ac0
commit
3928e52bf8
|
@ -30,6 +30,12 @@ module ActionDispatch
|
|||
["/~page", [[:SLASH, "/"], [:LITERAL, "~page"]]],
|
||||
["/pa-ge", [[:SLASH, "/"], [:LITERAL, "pa-ge"]]],
|
||||
["/:page", [[:SLASH, "/"], [:SYMBOL, ":page"]]],
|
||||
["/:page|*foo", [
|
||||
[:SLASH, "/"],
|
||||
[:SYMBOL, ":page"],
|
||||
[:OR, "|"],
|
||||
[:STAR, "*foo"]
|
||||
]],
|
||||
["/(:page)", [
|
||||
[:SLASH, "/"],
|
||||
[:LPAREN, "("],
|
||||
|
|
Loading…
Reference in New Issue