Blame view

bower_components/prism/tests/languages/puppet/regex_feature.test 596 Bytes
f748e9cf   Luigi Serra   new controllet an...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
  node /f(o)"o"[b]?a\/r/

  $foo = /foo

  bar # baz

  /m

  $foo = /foo

  bar # baz

  /ixm

  

  ----------------------------------------------------

  

  [

  	["keyword", "node"],

  	["regex", ["/f(o)\"o\"[b]?a\\/r/"]],

  	["variable", ["$foo"]], ["operator", "="],

  	["regex", ["/foo\r\nbar # baz\r\n/m"]],

  	["variable", ["$foo"]], ["operator", "="],

  	["regex", [

  		["extended-regex", [

  			"/foo\r\nbar ",

  			["comment", "# baz"],

  			"\r\n/ixm"

  		]]

  	]]

  ]

  

  ----------------------------------------------------

  

  Checks for regular expressions.

  Also checks that extended-regex accept inline comments.