2 |
3 |
4 |
--------------------------------------------------------------------------------
/test/browser/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | require('./plain');
4 | require('./worker');
5 | require('./highlight_block_callbacks');
6 |
--------------------------------------------------------------------------------
/test/detect/plaintext/default.txt:
--------------------------------------------------------------------------------
1 | id | description
2 | ----+-------------
3 | 1 | one
4 | 2 | two
5 | 3 | three
6 | (3 rows)
7 |
--------------------------------------------------------------------------------
/test/markup/fsharp/bang-keywords.expect.txt:
--------------------------------------------------------------------------------
1 | let! (result2 : byte[]) = stream.AsyncRead(bufferSize)
2 |
--------------------------------------------------------------------------------
/test/markup/handlebars/block-parameters-as.txt:
--------------------------------------------------------------------------------
1 | {{#each filter as | value index|}} {{/each}}
2 |
3 | {{#with as as | as |}} {{/with}}
4 |
--------------------------------------------------------------------------------
/test/markup/subunit/subunit-uxsuccessline.txt:
--------------------------------------------------------------------------------
1 | uxsuccess test simplename
2 | uxsuccess: test simple name
3 | uxsuccess test simple name
4 |
--------------------------------------------------------------------------------
/test/markup/vim/strings-comments.txt:
--------------------------------------------------------------------------------
1 | " comment
2 | let one = "string" " comment
3 | let two = "crazy
4 | \ string with a \" quote"
5 |
--------------------------------------------------------------------------------
/test/detect/dust/default.txt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | <%= link_to post.title, post %>
5 | <% end %> 6 | 7 | <%- available_things = things.select(&:available?) -%> 8 | <%%- x = 1 + 2 -%%> 9 | <%% value = 'real string #{@value}' %%> 10 | <%%= available_things.inspect %%> 11 | -------------------------------------------------------------------------------- /test/markup/handlebars/else-variants.txt: -------------------------------------------------------------------------------- 1 | {{#helper}}{{else}}else-block{{/helper}} 2 | 3 | {{#helper}}block{{else}}else-block{{/helper}} 4 | 5 | {{[else]}} in brackets is a helper, not a keyword 6 | 7 | {{#else}} as block helper name is not a keyword {{/else}} 8 | 9 | \{{else}} is not a keyword if escaped 10 | 11 | -------------------------------------------------------------------------------- /test/markup/subunit/subunit-tagline.expect.txt: -------------------------------------------------------------------------------- 1 | tags: fuzz unit beta functional 2 | tags: -functional basic -beta 3 | tags: -unit 4 | tags: unit 5 | tags: ddd 6 | -------------------------------------------------------------------------------- /test/detect/openscad/default.txt: -------------------------------------------------------------------------------- 1 | useTitle
12 | 13 | 14 | -------------------------------------------------------------------------------- /test/markup/maxima/numbers.txt: -------------------------------------------------------------------------------- 1 | 0 2 | 0. 3 | 12345. 4 | 12345 5 | 0.0 6 | 123.45 7 | 0e0 8 | 0b0 9 | 12345e0 10 | 12345e123 11 | 12345e-123 12 | 12345e+123 13 | 12345b0 14 | 12345b123 15 | 12345b-123 16 | 12345b+123 17 | 1.2345e0 18 | 1.2345e123 19 | 1.2345e-123 20 | 1.2345e+123 21 | 1.2345b0 22 | 1.2345b123 23 | 1.2345b-123 24 | 1.2345b+123 25 | -------------------------------------------------------------------------------- /test/markup/yaml/tag.txt: -------------------------------------------------------------------------------- 1 | key: !!builtintagname test 2 | key: !localtagname test 3 | key: "!notatag" 4 | key: '!!notatageither' 5 | key: !!python/dict test 6 | key: !!python/name:module.name test 7 | key: !foo2.bar test 8 | key: !(foo.bar?):tag test 9 | key: !named!tag test 10 | 11 | --- !functional component
; 5 | 6 | const good = () => 0; 7 | const good = (x) => 0; 8 | const bad = (a => [...a, b]); 9 | const bad = (_ => doSomething()); 10 | const bad = (() => 0); 11 | const bad = ((a, b) => [...a, b]); 12 | const array = [1, 2, 3].reduce((acc, next) => [...acc, next], []); 13 | sides.every((length,width=(3+2+(4/5))) => length > 0 ); 14 | 15 | -------------------------------------------------------------------------------- /test/detect/go/swift-like.txt: -------------------------------------------------------------------------------- 1 | func makeRequest(method string, url string, cb func(error, io.ReadCloser)) { 2 | req, _ := http.NewRequest(method, url, nil) 3 | resp, err := http.DefaultClient.Do(req) 4 | if err != nil { 5 | cb(err, nil) 6 | } else { 7 | cb(err, resp.Body) 8 | } 9 | } 10 | func main() { 11 | makeRequest("GET", "http://ipinfo.io/json", func(err error, body io.ReadCloser) { 12 | defer body.Close() 13 | io.Copy(os.Stdout, body) 14 | }) 15 | } 16 | -------------------------------------------------------------------------------- /test/detect/q/default.txt: -------------------------------------------------------------------------------- 1 | select time, price by date,stock from quote where price=(max;price)fby stock 2 | data:raze value flip trade 3 | select vwap:size wavg price by 5 xbar time.minute from aapl where date within (.z.d-10;.z.d) 4 | f1:{[x;y;z] show (x;y+z);sum 1 2 3} 5 | .z.pc:{[handle] show -3!(`long$.z.p;"Closed";handle)} 6 | // random normal distribution, e.g. nor 10 7 | nor:{$[x=2*n:x div 2;raze sqrt[-2*log n?1f]*/:(sin;cos)@\:(2*pi)*n?1f;-1_.z.s 1+x]} 8 | 9 | mode:{where g=max g:count each group x} // mode function -------------------------------------------------------------------------------- /test/detect/rsl/default.txt: -------------------------------------------------------------------------------- 1 | #define TEST_DEFINE 3.14 2 | /* plastic surface shader 3 | * 4 | * Pixie is: 5 | * (c) Copyright 1999-2003 Okan Arikan. All rights reserved. 6 | */ 7 | 8 | surface plastic (float Ka = 1, Kd = 0.5, Ks = 0.5, roughness = 0.1; 9 | color specularcolor = 1;) { 10 | normal Nf = faceforward (normalize(N),I); 11 | Ci = Cs * (Ka*ambient() + Kd*diffuse(Nf)) + specularcolor * Ks * 12 | specular(Nf,-normalize(I),roughness); 13 | Oi = Os; 14 | Ci *= Oi; 15 | } 16 | -------------------------------------------------------------------------------- /test/markup/cpp/function-declarations.txt: -------------------------------------------------------------------------------- 1 | decltype(auto) look_up_a_string_1() { return lookup1(); } 2 | void look_up_a_string_2() { return lookup2(); } 3 | friend void A::showB(B x) {} 4 | friend void showB(B x) {} 5 | friend void showB(B::SomeType x) {} 6 | inline int add(int a, int b) {} 7 | int8t Get_Tile_Value() {} 8 | 9 | int8_t Get_Tile_Value() {} 10 | 11 | B::type test() {}; 12 | 13 | // template 14 | boost::optionalHello {$name}!
20 | else 21 | () 22 | }; 23 | -------------------------------------------------------------------------------- /test/detect/gcode/default.txt: -------------------------------------------------------------------------------- 1 | O003 (DIAMOND SQUARE) 2 | N2 G54 G90 G49 G80 3 | N3 M6 T1 (1.ENDMILL) 4 | N4 M3 S1800 5 | N5 G0 X-.6 Y2.050 6 | N6 G43 H1 Z.1 7 | N7 G1 Z-.3 F50. 8 | N8 G41 D1 Y1.45 9 | N9 G1 X0 F20. 10 | N10 G2 J-1.45 11 | (CUTTER COMP CANCEL) 12 | N11 G1 Z-.2 F50. 13 | N12 Y-.990 14 | N13 G40 15 | N14 G0 X-.6 Y1.590 16 | N15 G0 Z.1 17 | N16 M5 G49 G28 G91 Z0 18 | N17 CALL O9456 19 | N18 #500=0.004 20 | N19 #503=[#500+#501] 21 | N20 VC45=0.0006 22 | VS4=0.0007 23 | N21 G90 G10 L20 P3 X5.Y4. Z6.567 24 | N22 G0 X5000 25 | N23 IF [#1 LT 0.370] GOTO 49 26 | N24 X-0.678 Y+.990 27 | N25 G84.3 X-0.1 28 | N26 #4=#5*COS[45] 29 | N27 #4=#5*SIN[45] 30 | N28 VZOFZ=652.9658 31 | % 32 | -------------------------------------------------------------------------------- /test/markup/fsharp/comments.expect.txt: -------------------------------------------------------------------------------- 1 | (* here is a multi-line comment on one line *) 2 | 3 | (* 4 | here is a multi-line comment on 5 | multiple lines 6 | *) 7 | 8 | let index = 9 | len 10 | |> float 11 | |> Operators.(*) 0.1 // (*) here is not comment 12 | |> Operators.(+) 1 // (+) here is not comment 13 | |> Operators.(-) len // (-) here is not comment 14 | ;; 15 | --------------------------------------------------------------------------------