diff --git a/debug.log b/debug.log deleted file mode 100644 index 5facaff0d9..0000000000 --- a/debug.log +++ /dev/null @@ -1,2702 +0,0 @@ - -> highlight.js@10.3.99 test /home/marat/Документы/highlight.js -> mocha test - - - - hljs - .IDENT_RE - ✓ should match non-underscore starting words - ✓ should not match underscore starting words - .UNDERSCORE_IDENT_RE - ✓ should match any word starting without numbers - ✓ should not match any word starting with numbers - .NUMBER_RE - ✓ should match regular numbers and decimals (128ms) - ✓ should not match hex or binary numbers - .C_NUMBER_RE - ✓ should match regular numbers (50ms) - ✓ should match decimals - ✓ should match hex numbers - ✓ should not match hex numbers greater than "f" - ✓ should not match binary numbers - .BINARY_NUMBER_RE - ✓ should match binary numbers - ✓ should not match binary numbers greater than 2 - .RE_STARTERS_RE - ✓ should match boolean operators - ✓ should match arithmetic operators - ✓ should match binary operators - ✓ should match miscellaneous operators - .getLanguage() - ✓ should get an existing language - ✓ should get an existing language by alias - ✓ should be case insensitive - ✓ should return undefined - ✓ should not break on undefined - ✓ should get the csharp language by c# alias - ✓ should not succeed for constructor - ✓ should not succeed for __proto__ - .autoDetection() - ✓ should get an existing language - ✓ should get an existing language by alias - ✓ should be case insensitive - ✓ should return undefined - ✓ should not break on undefined - .highlight() - ✓ should works without continuation - .fixmarkup() - ✓ should not strip HTML from beginning of strings - ✓ should not add "undefined" to the beginning of the result (#1452) - computing the relevance score of a language - ✓ should ignore common keywords - ✓ should not ignore weighted common keywords - ✓ should not ignore weighted common keywords (if 1 is forced) - .registerAliases() - ✓ should get an existing language by alias - ✓ should get an existing language by aliases - - hljs - parser specifics - a grammar with look-ahead end matchers - ✓ should match successfully - bugs - resume scan when a match is ignored - ✓ should continue to highlight later matches - ✓ BUT should not skip ahead too far - bugs - modes containing 'endsWithParent' - ✓ should be allowed to be reused - bugs - a grammar with a mode that makes a 0 width match - ✓ should instead count it as a 1 character match - - hljs.highlightAuto() - ✓ adding dynamic tests... - - highlight() markup - ✓ adding dynamic tests... - - special cases tests - explicit language class - ✓ should highlight block with language in code tag - ✓ should highlight block with language in pre tag - ✓ should highlight using html 5 style (language-*) - ✓ should highlight with shortened prefix (lang-) - ✓ should highlight if classname contains uppercase symbols - custom markup - ✓ should replace tabs - ✓ should keep custom markup - ✓ should keep custom markup and replace tabs - ✓ should keep the same amount of void elements (
,
, ...) - language alias - ✓ should highlight as aliased language - no highlighting - ✓ should keep block unchanged (nohighlight) - ✓ should keep block unchanged (no-highlight) - ✓ should skip pre tags without a child code tag - ✓ should keep block unchanged (unsupported language) - ✓ should keep block unchanged (unsupported lang) - ✓ should keep block unchanged (unsupported prefixed language) - sub-languages - ✓ should highlight XML with PHP and JavaScript - block class names - ✓ should add language class name to block - ✓ should not clutter block class (first) - ✓ should not clutter block class (last) - ✓ should not clutter block class (spaces around) - use br - ✓ should respect
tags - ✓ should ignore literal new lines - ✓ should recognize xml-style
- ends with parent variants - ✓ should end on all variants - - hljs.highlightAuto() - ✓ should be detected as 1c (294ms) - ✓ should be detected as abnf (151ms) - ✓ should be detected as accesslog (87ms) - ✓ should be detected as actionscript (258ms) - ✓ should be detected as ada (54ms) - ✓ should be detected as angelscript (188ms) - ✓ should be detected as apache (116ms) - ✓ should be detected as applescript (78ms) - ✓ should be detected as arcade (111ms) - ✓ should be detected as cpp (198ms) - ✓ should be detected as arduino (101ms) - ✓ should be detected as armasm (92ms) - ✓ should be detected as xml (145ms) - ✓ should be detected as asciidoc (106ms) - ✓ should be detected as aspectj (115ms) - ✓ should be detected as autohotkey (68ms) - ✓ should be detected as autoit (71ms) - ✓ should be detected as avrasm (76ms) - ✓ should be detected as awk (102ms) - ✓ should be detected as axapta (51ms) - ✓ should be detected as bash (57ms) - ✓ should be detected as basic (100ms) - ✓ should be detected as bnf (87ms) - ✓ should be detected as brainfuck (77ms) - ✓ should be detected as cal (82ms) - ✓ should be detected as capnproto (116ms) - ✓ should be detected as ceylon (45ms) - ✓ should be detected as clean (70ms) - ✓ should be detected as clojure (57ms) - ✓ should be detected as clojure-repl (39ms) - ✓ should be detected as cmake (63ms) - ✓ should be detected as coffeescript (70ms) - ✓ should be detected as coq (88ms) - ✓ should be detected as cos (87ms) - ✓ should be detected as crmsh (112ms) - ✓ should be detected as crystal (81ms) - ✓ should be detected as csharp (61ms) - ✓ should be detected as csp - ✓ should be detected as css (52ms) - ✓ should be detected as d (71ms) - ✓ should be detected as markdown (50ms) - ✓ should be detected as dart (84ms) - ✓ should be detected as delphi (75ms) - ✓ should be detected as diff (74ms) - ✓ should be detected as django (56ms) - ✓ should be detected as dns (114ms) - ✓ should be detected as dockerfile (111ms) - ✓ should be detected as dos (55ms) - ✓ should be detected as dsconfig (92ms) - ✓ should be detected as dts (168ms) - ✓ should be detected as dust - ✓ should be detected as ebnf (92ms) - ✓ should be detected as elixir (71ms) - ✓ should be detected as elm (59ms) - ✓ should be detected as ruby (53ms) - ✓ should be detected as erb (55ms) - ✓ should be detected as erlang-repl (77ms) - ✓ should be detected as erlang (102ms) - ✓ should be detected as excel - ✓ should be detected as fix (210ms) - ✓ should be detected as flix (93ms) - ✓ should be detected as fortran (47ms) - ✓ should be detected as fsharp (85ms) - ✓ should be detected as gams (97ms) - ✓ should be detected as gauss (73ms) - ✓ should be detected as gcode (112ms) - ✓ should be detected as gherkin (59ms) - ✓ should be detected as glsl (66ms) - ✓ should be detected as gml (46ms) - ✓ should be detected as go (116ms) - ✓ should be detected as golo (42ms) - ✓ should be detected as gradle (113ms) - ✓ should be detected as groovy (88ms) - ✓ should be detected as haml (44ms) - ✓ should be detected as handlebars - ✓ should be detected as haskell (75ms) - ✓ should be detected as haxe (198ms) - ✓ should be detected as hsp (47ms) - ✓ should be detected as http (113ms) - ✓ should be detected as hy (67ms) - ✓ should be detected as inform7 (71ms) - ✓ should be detected as ini (43ms) - ✓ should be detected as irpf90 (109ms) - ✓ should be detected as isbl (104ms) - ✓ should be detected as java (67ms) - ✓ should be detected as javascript (162ms) - ✓ should be detected as javascript-repl - ✓ should be detected as jboss-cli (48ms) - ✓ should be detected as json (59ms) - ✓ should be detected as julia (164ms) - ✓ should be detected as julia-repl (94ms) - ✓ should be detected as kotlin - ✓ should be detected as lasso (109ms) - ✓ should be detected as latex (67ms) - ✓ should be detected as ldif (105ms) - ✓ should be detected as leaf (44ms) - ✓ should be detected as less (105ms) - ✓ should be detected as lisp (68ms) - ✓ should be detected as livecodeserver (81ms) - ✓ should be detected as livescript (193ms) - ✓ should be detected as llvm (372ms) - ✓ should be detected as lsl - ✓ should be detected as lua (66ms) - ✓ should be detected as makefile (41ms) - ✓ should be detected as mathematica (65ms) - ✓ should be detected as matlab (181ms) - ✓ should be detected as maxima (139ms) - ✓ should be detected as mel (59ms) - ✓ should be detected as mercury (90ms) - ✓ should be detected as mipsasm (52ms) - ✓ should be detected as mizar (168ms) - ✓ should be detected as perl (100ms) - ✓ should be detected as mojolicious (102ms) - ✓ should be detected as monkey (72ms) - ✓ should be detected as moonscript (98ms) - ✓ should be detected as n1ql (65ms) - ✓ should be detected as nginx (101ms) - ✓ should be detected as nim (62ms) - ✓ should be detected as nix (75ms) - ✓ should be detected as nsis (78ms) - ✓ should be detected as objectivec (39ms) - ✓ should be detected as ocaml (67ms) - ✓ should be detected as openscad (67ms) - ✓ should be detected as oxygene (94ms) - ✓ should be detected as parser3 (82ms) - ✓ should be detected as pf (101ms) - ✓ should be detected as pgsql (52ms) - ✓ should be detected as php (110ms) - ✓ should be detected as php-template - ✓ should be detected as pony (51ms) - ✓ should be detected as powershell (61ms) - ✓ should be detected as processing (51ms) - ✓ should be detected as profile (69ms) - ✓ should be detected as prolog (38ms) - ✓ should be detected as properties - ✓ should be detected as protobuf (76ms) - ✓ should be detected as puppet (101ms) - ✓ should be detected as purebasic (110ms) - ✓ should be detected as python (79ms) - ✓ should be detected as python-repl (51ms) - ✓ should be detected as q (100ms) - ✓ should be detected as qml (126ms) - ✓ should be detected as r (142ms) - ✓ should be detected as reasonml (74ms) - ✓ should be detected as rib (118ms) - ✓ should be detected as roboconf (78ms) - ✓ should be detected as routeros (78ms) - ✓ should be detected as rsl (51ms) - ✓ should be detected as ruleslanguage (123ms) - ✓ should be detected as rust (41ms) - ✓ should be detected as sas (103ms) - ✓ should be detected as scala (161ms) - ✓ should be detected as scheme (61ms) - ✓ should be detected as scilab (56ms) - ✓ should be detected as scss (110ms) - ✓ should be detected as shell - ✓ should be detected as smali (139ms) - ✓ should be detected as smalltalk (79ms) - ✓ should be detected as sml (43ms) - ✓ should be detected as sqf (58ms) - ✓ should be detected as sql (79ms) - ✓ should be detected as stan (131ms) - ✓ should be detected as stata (74ms) - ✓ should be detected as step21 (148ms) - ✓ should be detected as stylus (60ms) - ✓ should be detected as subunit (163ms) - ✓ should be detected as swift (48ms) - ✓ should be detected as taggerscript (60ms) - ✓ should be detected as yaml (63ms) - ✓ should be detected as tap (87ms) - ✓ should be detected as tcl (80ms) - ✓ should be detected as thrift (69ms) - ✓ should be detected as tp (500ms) - ✓ should be detected as twig (53ms) - ✓ should be detected as typescript (46ms) - ✓ should be detected as vala (94ms) - ✓ should be detected as vbnet (74ms) - ✓ should be detected as vbscript (73ms) - ✓ should be detected as vbscript-html - ✓ should be detected as verilog (89ms) - ✓ should be detected as vhdl (85ms) - ✓ should be detected as vim - ✓ should be detected as x86asm (91ms) - ✓ should be detected as xl (157ms) - ✓ should be detected as xquery (133ms) - ✓ should be detected as zephir (111ms) - - abnf - ✓ should markup default - - accesslog - ✓ should markup default - - actionscript - ✓ should markup method-call - - arcade - ✓ should markup profile - - arduino - ✓ should markup default - - armasm - ✓ should markup default - - aspectj - ✓ should markup intertype-constructor - ✓ should markup intertype-method - - bash - ✓ should markup arithmetic - ✓ should markup escaped-quote - ✓ should markup no-numbers - ✓ should markup strings - ✓ should markup token-containing-keyword - ✓ should markup variables - - ceylon - ✓ should markup nested-comments - - clojure - ✓ should markup globals_definition - ✓ should markup hint_col - ✓ should markup symbols-numbers - - clojure-repl - ✓ should markup prompt - - coffeescript - ✓ should markup division - ✓ should markup freeze_bug - ✓ should markup function - ✓ should markup regex - - cos - ✓ should markup basic - ✓ should markup embedded - - cpp - ✓ should markup expression-keywords - ✓ should markup function-declarations - ✓ should markup function-params - ✓ should markup function-title - ✓ should markup number-literals - ✓ should markup pointers-returns - ✓ should markup preprocessor - ✓ should markup primitive-types - ✓ should markup string-literals - ✓ should markup template_complexity - ✓ should markup truncated-block-comment - ✓ should markup truncated-raw-string - - crystal - ✓ should markup defs - ✓ should markup literals - ✓ should markup macro - ✓ should markup operators - ✓ should markup regexes - ✓ should markup toplevel-keywords - - csharp - ✓ should markup dotted-namespace - ✓ should markup floats - ✓ should markup functions - ✓ should markup generic_modifiers - ✓ should markup identifiers - ✓ should markup records - ✓ should markup string-interpolation - ✓ should markup titles - - css - ✓ should markup pseudo-selector - ✓ should markup sample - ✓ should markup url - - dart - ✓ should markup comment-markdown - ✓ should markup string-interpolation - - delphi - ✓ should markup compiler-directive - - diff - ✓ should markup comments - - dockerfile - ✓ should markup default - - dos - ✓ should markup comments - - dsconfig - ✓ should markup default - - ebnf - ✓ should markup quote-symbols - ✓ should markup terminators - ✓ should markup underscore-production - - elixir - ✓ should markup function-not-regex - ✓ should markup function-title - ✓ should markup numbers - ✓ should markup sigils - ✓ should markup strings - ✓ should markup uppercase-string-sigil - - erlang - ✓ should markup numbers - - excel - ✓ should markup comments - - fortran - ✓ should markup comments - ✓ should markup numbers - - fsharp - ✓ should markup bang-keywords - ✓ should markup comments - - gauss - ✓ should markup function_defs - ✓ should markup function_refs - ✓ should markup keywords - - go - ✓ should markup functions - ✓ should markup numbers - ✓ should markup strings - - golo - ✓ should markup default - - groovy - ✓ should markup default - ✓ should markup oneoffs - - handlebars - ✓ should markup block-expression-variants-as-path-segment - ✓ should markup block-expression-variants-in-helper-name - ✓ should markup block-expression-variants-in-param - ✓ should markup block-parameters-as - ✓ should markup block-with-param - ✓ should markup block - ✓ should markup built-ins - ✓ should markup combinations-with-text - ✓ should markup comments - ✓ should markup else-variants - ✓ should markup escaped-mustaches - ✓ should markup expression-variants - ✓ should markup hashes - ✓ should markup if-else - ✓ should markup literals-in-different-places - ✓ should markup literals - ✓ should markup partial-call - ✓ should markup path-expressions - ✓ should markup raw-block - ✓ should markup simple-expression - ✓ should markup sub-expressions - ✓ should markup triple-mustache - - haskell - ✓ should markup infix - ✓ should markup nested-comments - - http - ✓ should markup default - - ini - ✓ should markup array - ✓ should markup comments - ✓ should markup keys - ✓ should markup tables - ✓ should markup types - ✓ should markup variable - - java - ✓ should markup annotations - ✓ should markup gh1031 - ✓ should markup numbers - ✓ should markup titles - - javascript - ✓ should markup arrow-function - ✓ should markup class - ✓ should markup comments - ✓ should markup default-parameters - ✓ should markup inline-languages - ✓ should markup jsdoc - ✓ should markup jsx-fragment - ✓ should markup jsx - ✓ should markup keyword_as_identifier - ✓ should markup keyword-as-part-of-method-name - ✓ should markup keywords - ✓ should markup method-call - ✓ should markup modules - ✓ should markup numbers - ✓ should markup object-attr - ✓ should markup regex - ✓ should markup shebang - ✓ should markup template-strings - - javascript-repl - 1) should markup sample - - json - ✓ should markup comments - - kotlin - ✓ should markup class - ✓ should markup function - ✓ should markup nested_comment - ✓ should markup string - - lasso - ✓ should markup delimiters - - latex - ✓ should markup chars - ✓ should markup comments - ✓ should markup control_sequences - ✓ should markup parameters - ✓ should markup verbatim - - ldif - ✓ should markup ldapmodify - ✓ should markup schema - - less - ✓ should markup selectors - - lisp - ✓ should markup mec - - markdown - ✓ should markup bold_italics - ✓ should markup code - ✓ should markup list - ✓ should markup sections - - matlab - ✓ should markup block_comment - ✓ should markup transpose - - maxima - ✓ should markup example - ✓ should markup numbers - ✓ should markup symbols - - objectivec - ✓ should markup preprocessor - ✓ should markup string-literals - - ocaml - ✓ should markup literals - ✓ should markup types - - pgsql - ✓ should markup clauses - ✓ should markup clauses2 - ✓ should markup constraints - ✓ should markup dollar_strings - ✓ should markup options - ✓ should markup plpgsql - ✓ should markup sql-commands - ✓ should markup window-functions - ✓ should markup xml - - php - 2) should markup comments - ✓ should markup strings - - pony - ✓ should markup control-flow - ✓ should markup creator - ✓ should markup iterface-trait - ✓ should markup lambda - ✓ should markup match - ✓ should markup method - ✓ should markup number-literals - ✓ should markup objects - ✓ should markup prime - ✓ should markup triple-quote - - powershell - ✓ should markup apos-herestring - ✓ should markup classes - ✓ should markup misc - ✓ should markup quote-herestring - - properties - ✓ should markup syntax - - protobuf - ✓ should markup message-message - ✓ should markup rpc - - python - ✓ should markup escaped-quotes - ✓ should markup f-strings - ✓ should markup function-header-comments - ✓ should markup function-header - ✓ should markup keywords - ✓ should markup matrix-multiplication - ✓ should markup numbers - - python-repl - ✓ should markup sample - - r - ✓ should markup names - ✓ should markup numbers - ✓ should markup roxygen - ✓ should markup strings - - reasonml - ✓ should markup functions - ✓ should markup literals - ✓ should markup modules - ✓ should markup pattern-matching - - ruby - ✓ should markup gemfile - ✓ should markup heredoc - 3) should markup numbers - ✓ should markup prompt - ✓ should markup regexes - - rust - ✓ should markup comments - ✓ should markup numbers - ✓ should markup strings - ✓ should markup traits - ✓ should markup types - ✓ should markup variables - - scala - ✓ should markup case-classes - - scheme - ✓ should markup lambda - ✓ should markup quoted - - shell - ✓ should markup plain-prompt - ✓ should markup prompt-with-slash - - sql - ✓ should markup interval - ✓ should markup join - ✓ should markup keywords - ✓ should markup lateral-view - ✓ should markup numeric-types - ✓ should markup set-operator - ✓ should markup string-types - ✓ should markup tablesample - ✓ should markup values-statement - ✓ should markup window-function - - stata - ✓ should markup built_ins - - subunit - ✓ should markup subunit-errorline - ✓ should markup subunit-failureline - ✓ should markup subunit-progressline - ✓ should markup subunit-skipline - ✓ should markup subunit-successline - ✓ should markup subunit-tagline - ✓ should markup subunit-testline - ✓ should markup subunit-timeline - ✓ should markup subunit-uxsuccessline - ✓ should markup subunit-xfailline - - swift - ✓ should markup functions - ✓ should markup multiline-string - - tap - ✓ should markup basic - ✓ should markup without-numbers - ✓ should markup yaml-block - - twig - ✓ should markup filter_with_underscore - ✓ should markup template_tags - - typescript - ✓ should markup class - ✓ should markup declares - ✓ should markup decorator-factories - ✓ should markup functions - ✓ should markup identifiers_that_include_keywords - ✓ should markup inline-languages - ✓ should markup jsx - ✓ should markup module-id - ✓ should markup nested-templates - ✓ should markup numbers-and-dashes - ✓ should markup numbers - - verilog - ✓ should markup misc - ✓ should markup numbers - - vim - ✓ should markup strings-comments - - x86asm - ✓ should markup labels-directives - - xml - ✓ should markup document-type-variations - ✓ should markup space-attributes - ✓ should markup sublanguage_no_relevancy - ✓ should markup unquoted-attributes - - xquery - ✓ should markup computed_inbuilt - ✓ should markup direct_method - ✓ should markup function_body - ✓ should markup prolog_declarations - - yaml - ✓ should markup block - ✓ should markup inline - ✓ should markup keys - ✓ should markup numbers - ✓ should markup string - ✓ should markup tag - - zephir - ✓ should markup default - - - 538 passing (20s) - 3 failing - - 1) javascript-repl - should markup sample: - - AssertionError: expected '> for(let i=0;i<5;i++){\n... console.log(i);\n... }\n0\n1\n2\n3\n4\nundefined\n>' to be '> for(let i=0;i<5;i++){\n... console.log(i);\n... }\n0\n1\n2\n3\n4\nundefined\n>' - + expected - actual - - -> for(let i=0;i<5;i++){ - -... console.log(i); - -... } - +> for(let i=0;i<5;i++){ - +... console.log(i); - +... } - 0 - 1 - 2 - 3 - - at Assertion.fail (node_modules/should/cjs/should.js:275:17) - at Assertion.value (node_modules/should/cjs/should.js:356:19) - at /home/marat/Документы/highlight.js/test/markup/index.js:36:32 - - 2) php - should markup comments: - - AssertionError: expected '<?php\n\n/**\n * @param int $a\n * @return bool\n */\nfunction isEven($a) {\n return ($a % 2) === 0;\n}\n\n/**\n * TODO: Rely on isEven, but do not highlight bug.\n *\n * @param int $a\n * @return bool\n */\nfunction isOdd($a) {\n return ($a % 2) === 1;\n}' to be '<?php\n\n/**\n * @param int $a\n * @return bool\n */\nfunction isEven($a) {\n return ($a % 2) === 0;\n}\n\n/**\n * TODO: Rely on isEven, but do not highlight bug.\n *\n * @param int $a\n * @return bool\n */\nfunction isOdd($a) {\n return ($a % 2) === 1;\n}' - + expected - actual - - /** - * @param int $a - * @return bool - */ - -function isEven($a) { - - return ($a % 2) === 0; - +function isEven($a) { - + return ($a % 2) === 0; - } - - /** - * TODO: Rely on isEven, but do not highlight bug. - * - * @param int $a - * @return bool - */ - -function isOdd($a) { - - return ($a % 2) === 1; - +function isOdd($a) { - + return ($a % 2) === 1; - } - - at Assertion.fail (node_modules/should/cjs/should.js:275:17) - at Assertion.value (node_modules/should/cjs/should.js:356:19) - at /home/marat/Документы/highlight.js/test/markup/index.js:36:32 - - 3) ruby - should markup numbers: - - AssertionError: expected '1; 10; 999; 0; 00; 000\n1; 1_0; 9_9_9; 0; 0_0; 0_0_0\n\n0D1; 0d10; 0D999; 0d0; 0D00; 0d000; 0d008\n0D1; 0d1_0; 0D9_9_9; 0d0; 0D0_0; 0d0_0_0; 0D0_0_8\n\n0b0; 0B11; 0B000; 0b010\n0b0; 0B1_1; 0B0_00; 0b01_0\n\n077; 0O0; 0o01; 0O777; 0o644\n0_7_7; 0O0; 0o0_1; 0O77_7; 0o6_44\n\n0x0; 0Xa0; 0X7FFF; 0xd3aD\n0x0; 0Xa_0; 0X7F_FF; 0xd3_aD\n\n\n4.2; 4.20; 88.0; 13.37\n4.2; 4.2_0; 8_8.0; 1_3.3_7\n\n0e10; 0.00e+10; 9e-10; 4.2E10; 40.0E+10; 0e100; 1010e+10\n0e1_0; 0.0_0e+10; 9e-1_0; 4.2E1_0; 4_0.0E+1_0; 0e1_0_0; 10_10e+10\n\n\n100r; 077r; 4.2r; 4.20r; 88.0r; 13.37r; 0d800r; 0B100r; 0o700r; 0XaB_cr\n1_00r; 0_7_7r; 4.2r; 4.2_0r; 88.0r; 1_3.3_7r; 0d8_0_0r; 0B1_00r; 0o70_0r; 0XaB_cr\n\n\n0i; 00i; 000i; 1234i; 077i; 0d08i; 0B11i; 0o77i; 13.37i\n0i; 0_0i; 0_0_0i; 12_34i; 0_77i; 0d0_8i; 0B1_1i; 0o7_7i; 13.3_7i\n\n1e100i; 13.37e08i; 13.37E-07i; 13.37e+09i\n1e1_0_0i; 1_3.3_7e0_8i; 1_3.3_7E-07i; 13.37e+0_9i\n\n\n100ri; 077ri; 4.2ri; 4.20ri; 88.0ri; 13.37ri; 0d800ri; 0B100ri; 0o700ri; 0XaB_cri\n1_00ri; 0_7_7ri; 4.2ri; 4.2_0ri; 88.0ri; 1_3.3_7ri; 0d8_0_0ri; 0B1_00ri; 0o70_0ri; 0XaB_cri\n\n\n# expressions containing numeric literals\n0..7; 1e1..2e1; 0b0.to_s\n\n# pseudo-expressions containing numeric literals\n0d100.0\n.0\n0.\n00.0\n\n# invalid pseudo-numeric expressions\n1__0\n1e_1\n1e1r\n08\n07e1\n0b1e1\n0I\n0R\n0ir' to be '1; 10; 999; 0; 00; 000\n1; 1_0; 9_9_9; 0; 0_0; 0_0_0\n\n0D1; 0d10; 0D999; 0d0; 0D00; 0d000; 0d008\n0D1; 0d1_0; 0D9_9_9; 0d0; 0D0_0; 0d0_0_0; 0D0_0_8\n\n0b0; 0B11; 0B000; 0b010\n0b0; 0B1_1; 0B0_00; 0b01_0\n\n077; 0O0; 0o01; 0O777; 0o644\n0_7_7; 0O0; 0o0_1; 0O77_7; 0o6_44\n\n0x0; 0Xa0; 0X7FFF; 0xd3aD\n0x0; 0Xa_0; 0X7F_FF; 0xd3_aD\n\n\n4.2; 4.20; 88.0; 13.37\n4.2; 4.2_0; 8_8.0; 1_3.3_7\n\n0e10; 0.00e+10; 9e-10; 4.2E10; 40.0E+10; 0e100; 1010e+10\n0e1_0; 0.0_0e+10; 9e-1_0; 4.2E1_0; 4_0.0E+1_0; 0e1_0_0; 10_10e+10\n\n\n100r; 077r; 4.2r; 4.20r; 88.0r; 13.37r; 0d800r; 0B100r; 0o700r; 0XaB_cr\n1_00r; 0_7_7r; 4.2r; 4.2_0r; 88.0r; 1_3.3_7r; 0d8_0_0r; 0B1_00r; 0o70_0r; 0XaB_cr\n\n\n0i; 00i; 000i; 1234i; 077i; 0d08i; 0B11i; 0o77i; 13.37i\n0i; 0_0i; 0_0_0i; 12_34i; 0_77i; 0d0_8i; 0B1_1i; 0o7_7i; 13.3_7i\n\n1e100i; 13.37e08i; 13.37E-07i; 13.37e+09i\n1e1_0_0i; 1_3.3_7e0_8i; 1_3.3_7E-07i; 13.37e+0_9i\n\n\n100ri; 077ri; 4.2ri; 4.20ri; 88.0ri; 13.37ri; 0d800ri; 0B100ri; 0o700ri; 0XaB_cri\n1_00ri; 0_7_7ri; 4.2ri; 4.2_0ri; 88.0ri; 1_3.3_7ri; 0d8_0_0ri; 0B1_00ri; 0o70_0ri; 0XaB_cri\n\n\n# expressions containing numeric literals\n0..7; 1e1..2e1; 0b0.to_s\n\n# pseudo-expressions containing numeric literals\n0d100.0\n.0\n0.\n00.0\n\n# invalid pseudo-numeric expressions\n1__0\n1e_1\n1e1r\n08\n07e1\n0b1e1\n0I\n0R\n0ir' - + expected - actual - - 1; 10; 999; 0; 00; 000 - 1; 1_0; 9_9_9; 0; 0_0; 0_0_0 - - -0D1; 0d10; 0D999; 0d0; 0D00; 0d000; 0d008 - -0D1; 0d1_0; 0D9_9_9; 0d0; 0D0_0; 0d0_0_0; 0D0_0_8 - +0D1; 0d10; 0D999; 0d0; 0D00; 0d000; 0d008 - +0D1; 0d1_0; 0D9_9_9; 0d0; 0D0_0; 0d0_0_0; 0D0_0_8 - - -0b0; 0B11; 0B000; 0b010 - -0b0; 0B1_1; 0B0_00; 0b01_0 - +0b0; 0B11; 0B000; 0b010 - +0b0; 0B1_1; 0B0_00; 0b01_0 - - -077; 0O0; 0o01; 0O777; 0o644 - -0_7_7; 0O0; 0o0_1; 0O77_7; 0o6_44 - +077; 0O0; 0o01; 0O777; 0o644 - +0_7_7; 0O0; 0o0_1; 0O77_7; 0o6_44 - - -0x0; 0Xa0; 0X7FFF; 0xd3aD - -0x0; 0Xa_0; 0X7F_FF; 0xd3_aD - +0x0; 0Xa0; 0X7FFF; 0xd3aD - +0x0; 0Xa_0; 0X7F_FF; 0xd3_aD - - - 4.2; 4.20; 88.0; 13.37 - 4.2; 4.2_0; 8_8.0; 1_3.3_7 - - -0e10; 0.00e+10; 9e-10; 4.2E10; 40.0E+10; 0e100; 1010e+10 - -0e1_0; 0.0_0e+10; 9e-1_0; 4.2E1_0; 4_0.0E+1_0; 0e1_0_0; 10_10e+10 - +0e10; 0.00e+10; 9e-10; 4.2E10; 40.0E+10; 0e100; 1010e+10 - +0e1_0; 0.0_0e+10; 9e-1_0; 4.2E1_0; 4_0.0E+1_0; 0e1_0_0; 10_10e+10 - - - -100r; 077r; 4.2r; 4.20r; 88.0r; 13.37r; 0d800r; 0B100r; 0o700r; 0XaB_cr - -1_00r; 0_7_7r; 4.2r; 4.2_0r; 88.0r; 1_3.3_7r; 0d8_0_0r; 0B1_00r; 0o70_0r; 0XaB_cr - +100r; 077r; 4.2r; 4.20r; 88.0r; 13.37r; 0d800r; 0B100r; 0o700r; 0XaB_cr - +1_00r; 0_7_7r; 4.2r; 4.2_0r; 88.0r; 1_3.3_7r; 0d8_0_0r; 0B1_00r; 0o70_0r; 0XaB_cr - - - -0i; 00i; 000i; 1234i; 077i; 0d08i; 0B11i; 0o77i; 13.37i - -0i; 0_0i; 0_0_0i; 12_34i; 0_77i; 0d0_8i; 0B1_1i; 0o7_7i; 13.3_7i - +0i; 00i; 000i; 1234i; 077i; 0d08i; 0B11i; 0o77i; 13.37i - +0i; 0_0i; 0_0_0i; 12_34i; 0_77i; 0d0_8i; 0B1_1i; 0o7_7i; 13.3_7i - - -1e100i; 13.37e08i; 13.37E-07i; 13.37e+09i - -1e1_0_0i; 1_3.3_7e0_8i; 1_3.3_7E-07i; 13.37e+0_9i - +1e100i; 13.37e08i; 13.37E-07i; 13.37e+09i - +1e1_0_0i; 1_3.3_7e0_8i; 1_3.3_7E-07i; 13.37e+0_9i - - - -100ri; 077ri; 4.2ri; 4.20ri; 88.0ri; 13.37ri; 0d800ri; 0B100ri; 0o700ri; 0XaB_cri - -1_00ri; 0_7_7ri; 4.2ri; 4.2_0ri; 88.0ri; 1_3.3_7ri; 0d8_0_0ri; 0B1_00ri; 0o70_0ri; 0XaB_cri - +100ri; 077ri; 4.2ri; 4.20ri; 88.0ri; 13.37ri; 0d800ri; 0B100ri; 0o700ri; 0XaB_cri - +1_00ri; 0_7_7ri; 4.2ri; 4.2_0ri; 88.0ri; 1_3.3_7ri; 0d8_0_0ri; 0B1_00ri; 0o70_0ri; 0XaB_cri - - - # expressions containing numeric literals - -0..7; 1e1..2e1; 0b0.to_s - +0..7; 1e1..2e1; 0b0.to_s - - # pseudo-expressions containing numeric literals - -0d100.0 - +0d100.0 - .0 - 0. - 00.0 - - # invalid pseudo-numeric expressions - -1__0 - -1e_1 - -1e1r - +1__0 - +1e_1 - +1e1r - 08 - -07e1 - +07e1 - 0b1e1 - 0I - 0R - 0ir - - at Assertion.fail (node_modules/should/cjs/should.js:275:17) - at Assertion.value (node_modules/should/cjs/should.js:356:19) - at /home/marat/Документы/highlight.js/test/markup/index.js:36:32 - - - - -> highlight.js@10.3.99 test /home/marat/Документы/highlight.js -> mocha test - - - - hljs - .IDENT_RE - ✓ should match non-underscore starting words - ✓ should not match underscore starting words - .UNDERSCORE_IDENT_RE - ✓ should match any word starting without numbers - ✓ should not match any word starting with numbers - .NUMBER_RE - ✓ should match regular numbers and decimals (129ms) - ✓ should not match hex or binary numbers - .C_NUMBER_RE - ✓ should match regular numbers (55ms) - ✓ should match decimals - ✓ should match hex numbers - ✓ should not match hex numbers greater than "f" - ✓ should not match binary numbers - .BINARY_NUMBER_RE - ✓ should match binary numbers - ✓ should not match binary numbers greater than 2 - .RE_STARTERS_RE - ✓ should match boolean operators - ✓ should match arithmetic operators - ✓ should match binary operators - ✓ should match miscellaneous operators - .getLanguage() - ✓ should get an existing language - ✓ should get an existing language by alias - ✓ should be case insensitive - ✓ should return undefined - ✓ should not break on undefined - ✓ should get the csharp language by c# alias - ✓ should not succeed for constructor - ✓ should not succeed for __proto__ - .autoDetection() - ✓ should get an existing language - ✓ should get an existing language by alias - ✓ should be case insensitive - ✓ should return undefined - ✓ should not break on undefined - .highlight() - ✓ should works without continuation - .fixmarkup() - ✓ should not strip HTML from beginning of strings - ✓ should not add "undefined" to the beginning of the result (#1452) - computing the relevance score of a language - ✓ should ignore common keywords - ✓ should not ignore weighted common keywords - ✓ should not ignore weighted common keywords (if 1 is forced) - .registerAliases() - ✓ should get an existing language by alias - ✓ should get an existing language by aliases - - hljs - parser specifics - a grammar with look-ahead end matchers - ✓ should match successfully - bugs - resume scan when a match is ignored - ✓ should continue to highlight later matches - ✓ BUT should not skip ahead too far - bugs - modes containing 'endsWithParent' - ✓ should be allowed to be reused - bugs - a grammar with a mode that makes a 0 width match - ✓ should instead count it as a 1 character match - - hljs.highlightAuto() - ✓ adding dynamic tests... - - highlight() markup - ✓ adding dynamic tests... - - special cases tests - explicit language class - ✓ should highlight block with language in code tag - ✓ should highlight block with language in pre tag - ✓ should highlight using html 5 style (language-*) - ✓ should highlight with shortened prefix (lang-) - ✓ should highlight if classname contains uppercase symbols - custom markup - ✓ should replace tabs - ✓ should keep custom markup - ✓ should keep custom markup and replace tabs - ✓ should keep the same amount of void elements (
,
, ...) - language alias - ✓ should highlight as aliased language - no highlighting - ✓ should keep block unchanged (nohighlight) - ✓ should keep block unchanged (no-highlight) - ✓ should skip pre tags without a child code tag - ✓ should keep block unchanged (unsupported language) - ✓ should keep block unchanged (unsupported lang) - ✓ should keep block unchanged (unsupported prefixed language) - sub-languages - ✓ should highlight XML with PHP and JavaScript - block class names - ✓ should add language class name to block - ✓ should not clutter block class (first) - ✓ should not clutter block class (last) - ✓ should not clutter block class (spaces around) - use br - ✓ should respect
tags - ✓ should ignore literal new lines - ✓ should recognize xml-style
- ends with parent variants - ✓ should end on all variants - - hljs.highlightAuto() - ✓ should be detected as 1c (326ms) - ✓ should be detected as abnf (135ms) - ✓ should be detected as accesslog (80ms) - ✓ should be detected as actionscript (247ms) - ✓ should be detected as ada (59ms) - ✓ should be detected as angelscript (188ms) - ✓ should be detected as apache (99ms) - ✓ should be detected as applescript (84ms) - ✓ should be detected as arcade (93ms) - ✓ should be detected as cpp (195ms) - ✓ should be detected as arduino (87ms) - ✓ should be detected as armasm (81ms) - ✓ should be detected as xml (141ms) - ✓ should be detected as asciidoc (91ms) - ✓ should be detected as aspectj (109ms) - ✓ should be detected as autohotkey (59ms) - ✓ should be detected as autoit (71ms) - ✓ should be detected as avrasm (76ms) - ✓ should be detected as awk (79ms) - ✓ should be detected as axapta (55ms) - ✓ should be detected as bash (61ms) - ✓ should be detected as basic (92ms) - ✓ should be detected as bnf (87ms) - ✓ should be detected as brainfuck (75ms) - ✓ should be detected as cal (84ms) - ✓ should be detected as capnproto (134ms) - ✓ should be detected as ceylon (55ms) - ✓ should be detected as clean (75ms) - ✓ should be detected as clojure (67ms) - ✓ should be detected as clojure-repl (39ms) - ✓ should be detected as cmake (82ms) - ✓ should be detected as coffeescript (98ms) - ✓ should be detected as coq (119ms) - ✓ should be detected as cos (119ms) - ✓ should be detected as crmsh (143ms) - ✓ should be detected as crystal (107ms) - ✓ should be detected as csharp (113ms) - ✓ should be detected as csp (86ms) - ✓ should be detected as css (143ms) - ✓ should be detected as d (208ms) - ✓ should be detected as markdown (149ms) - ✓ should be detected as dart (225ms) - ✓ should be detected as delphi (81ms) - ✓ should be detected as diff (117ms) - ✓ should be detected as django (86ms) - ✓ should be detected as dns (144ms) - ✓ should be detected as dockerfile (111ms) - ✓ should be detected as dos (59ms) - ✓ should be detected as dsconfig (112ms) - ✓ should be detected as dts (212ms) - ✓ should be detected as dust - ✓ should be detected as ebnf (122ms) - ✓ should be detected as elixir (84ms) - ✓ should be detected as elm (66ms) - ✓ should be detected as ruby (80ms) - ✓ should be detected as erb (69ms) - ✓ should be detected as erlang-repl (103ms) - ✓ should be detected as erlang (121ms) - ✓ should be detected as excel - ✓ should be detected as fix (257ms) - ✓ should be detected as flix (114ms) - ✓ should be detected as fortran (56ms) - ✓ should be detected as fsharp (99ms) - ✓ should be detected as gams (272ms) - ✓ should be detected as gauss (187ms) - ✓ should be detected as gcode (275ms) - ✓ should be detected as gherkin (104ms) - ✓ should be detected as glsl (65ms) - ✓ should be detected as gml (47ms) - ✓ should be detected as go (108ms) - ✓ should be detected as golo - ✓ should be detected as gradle (102ms) - ✓ should be detected as groovy (83ms) - ✓ should be detected as haml (42ms) - ✓ should be detected as handlebars - ✓ should be detected as haskell (81ms) - ✓ should be detected as haxe (190ms) - ✓ should be detected as hsp (39ms) - ✓ should be detected as http (97ms) - ✓ should be detected as hy (60ms) - ✓ should be detected as inform7 (55ms) - ✓ should be detected as ini - ✓ should be detected as irpf90 (93ms) - ✓ should be detected as isbl (90ms) - ✓ should be detected as java (52ms) - ✓ should be detected as javascript (156ms) - ✓ should be detected as javascript-repl - ✓ should be detected as jboss-cli (45ms) - ✓ should be detected as json (59ms) - ✓ should be detected as julia (156ms) - ✓ should be detected as julia-repl (86ms) - ✓ should be detected as kotlin - ✓ should be detected as lasso (98ms) - ✓ should be detected as latex (61ms) - ✓ should be detected as ldif (107ms) - ✓ should be detected as leaf (42ms) - ✓ should be detected as less (96ms) - ✓ should be detected as lisp (57ms) - ✓ should be detected as livecodeserver (69ms) - ✓ should be detected as livescript (131ms) - ✓ should be detected as llvm (286ms) - ✓ should be detected as lsl - ✓ should be detected as lua (62ms) - ✓ should be detected as makefile - ✓ should be detected as mathematica (43ms) - ✓ should be detected as matlab (154ms) - ✓ should be detected as maxima (134ms) - ✓ should be detected as mel (58ms) - ✓ should be detected as mercury (81ms) - ✓ should be detected as mipsasm (50ms) - ✓ should be detected as mizar (154ms) - ✓ should be detected as perl (103ms) - ✓ should be detected as mojolicious (94ms) - ✓ should be detected as monkey (70ms) - ✓ should be detected as moonscript (98ms) - ✓ should be detected as n1ql (63ms) - ✓ should be detected as nginx (93ms) - ✓ should be detected as nim (56ms) - ✓ should be detected as nix (69ms) - ✓ should be detected as nsis (69ms) - ✓ should be detected as objectivec - ✓ should be detected as ocaml (69ms) - ✓ should be detected as openscad (73ms) - ✓ should be detected as oxygene (86ms) - ✓ should be detected as parser3 (76ms) - ✓ should be detected as pf (78ms) - ✓ should be detected as pgsql (47ms) - ✓ should be detected as php (96ms) - ✓ should be detected as php-template - ✓ should be detected as pony (41ms) - ✓ should be detected as powershell (54ms) - ✓ should be detected as processing (53ms) - ✓ should be detected as profile (70ms) - ✓ should be detected as prolog - ✓ should be detected as properties - ✓ should be detected as protobuf (67ms) - ✓ should be detected as puppet (75ms) - ✓ should be detected as purebasic (93ms) - ✓ should be detected as python (54ms) - ✓ should be detected as python-repl (45ms) - ✓ should be detected as q (77ms) - ✓ should be detected as qml (119ms) - ✓ should be detected as r (134ms) - ✓ should be detected as reasonml (73ms) - ✓ should be detected as rib (109ms) - ✓ should be detected as roboconf (78ms) - ✓ should be detected as routeros (75ms) - ✓ should be detected as rsl (48ms) - ✓ should be detected as ruleslanguage (122ms) - ✓ should be detected as rust (38ms) - ✓ should be detected as sas (106ms) - ✓ should be detected as scala (167ms) - ✓ should be detected as scheme (57ms) - ✓ should be detected as scilab (58ms) - ✓ should be detected as scss (115ms) - ✓ should be detected as shell (38ms) - ✓ should be detected as smali (233ms) - ✓ should be detected as smalltalk (126ms) - ✓ should be detected as sml (55ms) - ✓ should be detected as sqf (92ms) - ✓ should be detected as sql (122ms) - ✓ should be detected as stan (163ms) - ✓ should be detected as stata (75ms) - ✓ should be detected as step21 (160ms) - ✓ should be detected as stylus (69ms) - ✓ should be detected as subunit (176ms) - ✓ should be detected as swift (46ms) - ✓ should be detected as taggerscript (62ms) - ✓ should be detected as yaml (60ms) - ✓ should be detected as tap (92ms) - ✓ should be detected as tcl (77ms) - ✓ should be detected as thrift (70ms) - ✓ should be detected as tp (492ms) - ✓ should be detected as twig (59ms) - ✓ should be detected as typescript (47ms) - ✓ should be detected as vala (103ms) - ✓ should be detected as vbnet (79ms) - ✓ should be detected as vbscript (80ms) - ✓ should be detected as vbscript-html (56ms) - ✓ should be detected as verilog (101ms) - ✓ should be detected as vhdl (86ms) - ✓ should be detected as vim - ✓ should be detected as x86asm (92ms) - ✓ should be detected as xl (175ms) - ✓ should be detected as xquery (133ms) - ✓ should be detected as zephir (138ms) - - abnf - ✓ should markup default - - accesslog - ✓ should markup default - - actionscript - ✓ should markup method-call - - arcade - ✓ should markup profile - - arduino - ✓ should markup default - - armasm - ✓ should markup default - - aspectj - ✓ should markup intertype-constructor - ✓ should markup intertype-method - - bash - ✓ should markup arithmetic - ✓ should markup escaped-quote - ✓ should markup no-numbers - ✓ should markup strings - ✓ should markup token-containing-keyword - ✓ should markup variables - - ceylon - ✓ should markup nested-comments - - clojure - ✓ should markup globals_definition - ✓ should markup hint_col - ✓ should markup symbols-numbers - - clojure-repl - ✓ should markup prompt - - coffeescript - ✓ should markup division - ✓ should markup freeze_bug - ✓ should markup function - ✓ should markup regex - - cos - ✓ should markup basic - ✓ should markup embedded - - cpp - ✓ should markup expression-keywords - ✓ should markup function-declarations - ✓ should markup function-params - ✓ should markup function-title - ✓ should markup number-literals - ✓ should markup pointers-returns - ✓ should markup preprocessor - ✓ should markup primitive-types - ✓ should markup string-literals - ✓ should markup template_complexity - ✓ should markup truncated-block-comment - ✓ should markup truncated-raw-string - - crystal - ✓ should markup defs - ✓ should markup literals - ✓ should markup macro - ✓ should markup operators - ✓ should markup regexes - ✓ should markup toplevel-keywords - - csharp - ✓ should markup dotted-namespace - ✓ should markup floats - ✓ should markup functions - ✓ should markup generic_modifiers - ✓ should markup identifiers - ✓ should markup records - ✓ should markup string-interpolation - ✓ should markup titles - - css - ✓ should markup pseudo-selector - ✓ should markup sample - ✓ should markup url - - dart - ✓ should markup comment-markdown - ✓ should markup string-interpolation - - delphi - ✓ should markup compiler-directive - - diff - ✓ should markup comments - - dockerfile - ✓ should markup default - - dos - ✓ should markup comments - - dsconfig - ✓ should markup default - - ebnf - ✓ should markup quote-symbols - ✓ should markup terminators - ✓ should markup underscore-production - - elixir - ✓ should markup function-not-regex - ✓ should markup function-title - ✓ should markup numbers - ✓ should markup sigils - ✓ should markup strings - ✓ should markup uppercase-string-sigil - - erlang - ✓ should markup numbers - - excel - ✓ should markup comments - - fortran - ✓ should markup comments - ✓ should markup numbers - - fsharp - ✓ should markup bang-keywords - ✓ should markup comments - - gauss - ✓ should markup function_defs - ✓ should markup function_refs - ✓ should markup keywords - - go - ✓ should markup functions - ✓ should markup numbers - ✓ should markup strings - - golo - ✓ should markup default - - groovy - ✓ should markup default - ✓ should markup oneoffs - - handlebars - ✓ should markup block-expression-variants-as-path-segment - ✓ should markup block-expression-variants-in-helper-name - ✓ should markup block-expression-variants-in-param - ✓ should markup block-parameters-as - ✓ should markup block-with-param - ✓ should markup block - ✓ should markup built-ins - ✓ should markup combinations-with-text - ✓ should markup comments - ✓ should markup else-variants - ✓ should markup escaped-mustaches - ✓ should markup expression-variants - ✓ should markup hashes - ✓ should markup if-else - ✓ should markup literals-in-different-places - ✓ should markup literals - ✓ should markup partial-call - ✓ should markup path-expressions - ✓ should markup raw-block - ✓ should markup simple-expression - ✓ should markup sub-expressions - ✓ should markup triple-mustache - - haskell - ✓ should markup infix - ✓ should markup nested-comments - - http - ✓ should markup default - - ini - ✓ should markup array - ✓ should markup comments - ✓ should markup keys - ✓ should markup tables - ✓ should markup types - ✓ should markup variable - - java - ✓ should markup annotations - ✓ should markup gh1031 - ✓ should markup numbers - ✓ should markup titles - - javascript - ✓ should markup arrow-function - ✓ should markup class - ✓ should markup comments - ✓ should markup default-parameters - ✓ should markup inline-languages - ✓ should markup jsdoc - ✓ should markup jsx-fragment - ✓ should markup jsx - ✓ should markup keyword_as_identifier - ✓ should markup keyword-as-part-of-method-name - ✓ should markup keywords - ✓ should markup method-call - ✓ should markup modules - ✓ should markup numbers - ✓ should markup object-attr - ✓ should markup regex - ✓ should markup shebang - ✓ should markup template-strings - - javascript-repl - 1) should markup sample - - json - ✓ should markup comments - - kotlin - ✓ should markup class - ✓ should markup function - ✓ should markup nested_comment - ✓ should markup string - - lasso - ✓ should markup delimiters - - latex - ✓ should markup chars - ✓ should markup comments - ✓ should markup control_sequences - ✓ should markup parameters - ✓ should markup verbatim - - ldif - ✓ should markup ldapmodify - ✓ should markup schema - - less - ✓ should markup selectors - - lisp - ✓ should markup mec - - markdown - ✓ should markup bold_italics - ✓ should markup code - ✓ should markup list - ✓ should markup sections - - matlab - ✓ should markup block_comment - ✓ should markup transpose - - maxima - ✓ should markup example - ✓ should markup numbers - ✓ should markup symbols - - objectivec - ✓ should markup preprocessor - ✓ should markup string-literals - - ocaml - ✓ should markup literals - ✓ should markup types - - pgsql - ✓ should markup clauses - ✓ should markup clauses2 - ✓ should markup constraints - ✓ should markup dollar_strings - ✓ should markup options - ✓ should markup plpgsql - ✓ should markup sql-commands - ✓ should markup window-functions - ✓ should markup xml - - php - 2) should markup comments - ✓ should markup strings - - pony - ✓ should markup control-flow - ✓ should markup creator - ✓ should markup iterface-trait - ✓ should markup lambda - ✓ should markup match - ✓ should markup method - ✓ should markup number-literals - ✓ should markup objects - ✓ should markup prime - ✓ should markup triple-quote - - powershell - ✓ should markup apos-herestring - ✓ should markup classes - ✓ should markup misc - ✓ should markup quote-herestring - - properties - ✓ should markup syntax - - protobuf - ✓ should markup message-message - ✓ should markup rpc - - python - ✓ should markup escaped-quotes - ✓ should markup f-strings - ✓ should markup function-header-comments - ✓ should markup function-header - ✓ should markup keywords - ✓ should markup matrix-multiplication - ✓ should markup numbers - - python-repl - ✓ should markup sample - - r - ✓ should markup names - ✓ should markup numbers - ✓ should markup roxygen - ✓ should markup strings - - reasonml - ✓ should markup functions - ✓ should markup literals - ✓ should markup modules - ✓ should markup pattern-matching - - ruby - ✓ should markup gemfile - ✓ should markup heredoc - 3) should markup numbers - ✓ should markup prompt - ✓ should markup regexes - - rust - ✓ should markup comments - ✓ should markup numbers - ✓ should markup strings - ✓ should markup traits - ✓ should markup types - ✓ should markup variables - - scala - ✓ should markup case-classes - - scheme - ✓ should markup lambda - ✓ should markup quoted - - shell - ✓ should markup plain-prompt - ✓ should markup prompt-with-slash - - sql - ✓ should markup interval - ✓ should markup join - ✓ should markup keywords - ✓ should markup lateral-view - ✓ should markup numeric-types - ✓ should markup set-operator - ✓ should markup string-types - ✓ should markup tablesample - ✓ should markup values-statement - ✓ should markup window-function - - stata - ✓ should markup built_ins - - subunit - ✓ should markup subunit-errorline - ✓ should markup subunit-failureline - ✓ should markup subunit-progressline - ✓ should markup subunit-skipline - ✓ should markup subunit-successline - ✓ should markup subunit-tagline - ✓ should markup subunit-testline - ✓ should markup subunit-timeline - ✓ should markup subunit-uxsuccessline - ✓ should markup subunit-xfailline - - swift - ✓ should markup functions - ✓ should markup multiline-string - - tap - ✓ should markup basic - ✓ should markup without-numbers - ✓ should markup yaml-block - - twig - ✓ should markup filter_with_underscore - ✓ should markup template_tags - - typescript - ✓ should markup class - ✓ should markup declares - ✓ should markup decorator-factories - ✓ should markup functions - ✓ should markup identifiers_that_include_keywords - ✓ should markup inline-languages - ✓ should markup jsx - ✓ should markup module-id - ✓ should markup nested-templates - ✓ should markup numbers-and-dashes - ✓ should markup numbers - - verilog - ✓ should markup misc - ✓ should markup numbers - - vim - ✓ should markup strings-comments - - x86asm - ✓ should markup labels-directives - - xml - ✓ should markup document-type-variations - ✓ should markup space-attributes - ✓ should markup sublanguage_no_relevancy - ✓ should markup unquoted-attributes - - xquery - ✓ should markup computed_inbuilt - ✓ should markup direct_method - ✓ should markup function_body - ✓ should markup prolog_declarations - - yaml - ✓ should markup block - ✓ should markup inline - ✓ should markup keys - ✓ should markup numbers - ✓ should markup string - ✓ should markup tag - - zephir - ✓ should markup default - - - 538 passing (22s) - 3 failing - - 1) javascript-repl - should markup sample: - - AssertionError: expected '> for(let i=0;i<5;i++){\n... console.log(i);\n... }\n0\n1\n2\n3\n4\nundefined\n>' to be '> for(let i=0;i<5;i++){\\n... console.log(i);\\n... }\\n0\\n1\\n2\\n3\\n4\\nundefined\\n>\' to be \'> for(let i=0;i<5;i++){\\n... console.log(i);\\n... }\\n0\\n1\\n2\\n3\\n4\\nundefined\\n>' - + expected - actual - - -> for(let i=0;i<5;i++){ - -... console.log(i); - -... } - -0 - -1 - -2 - -3 - -4 - -undefined - -> - +> for(let i=0;i<5;i++){\n... console.log(i);\n... }\n0\n1\n2\n3\n4\nundefined\n>' to be '> for(let i=0;i<5;i++){\n... console.log(i);\n... }\n0\n1\n2\n3\n4\nundefined\n> - - at Assertion.fail (node_modules/should/cjs/should.js:275:17) - at Assertion.value (node_modules/should/cjs/should.js:356:19) - at /home/marat/Документы/highlight.js/test/markup/index.js:36:32 - - 2) php - should markup comments: - - AssertionError: expected '<?php\n\n/**\n * @param int $a\n * @return bool\n */\nfunction isEven($a) {\n return ($a % 2) === 0;\n}\n\n/**\n * TODO: Rely on isEven, but do not highlight bug.\n *\n * @param int $a\n * @return bool\n */\nfunction isOdd($a) {\n return ($a % 2) === 1;\n}' to be '<?php\n\n/**\n * @param int $a\n * @return bool\n */\nfunction isEven($a) {\n return ($a % 2) === 0;\n}\n\n/**\n * TODO: Rely on isEven, but do not highlight bug.\n *\n * @param int $a\n * @return bool\n */\nfunction isOdd($a) {\n return ($a % 2) === 1;\n}' - + expected - actual - - /** - * @param int $a - * @return bool - */ - -function isEven($a) { - - return ($a % 2) === 0; - +function isEven($a) { - + return ($a % 2) === 0; - } - - /** - * TODO: Rely on isEven, but do not highlight bug. - * - * @param int $a - * @return bool - */ - -function isOdd($a) { - - return ($a % 2) === 1; - +function isOdd($a) { - + return ($a % 2) === 1; - } - - at Assertion.fail (node_modules/should/cjs/should.js:275:17) - at Assertion.value (node_modules/should/cjs/should.js:356:19) - at /home/marat/Документы/highlight.js/test/markup/index.js:36:32 - - 3) ruby - should markup numbers: - - AssertionError: expected '1; 10; 999; 0; 00; 000\n1; 1_0; 9_9_9; 0; 0_0; 0_0_0\n\n0D1; 0d10; 0D999; 0d0; 0D00; 0d000; 0d008\n0D1; 0d1_0; 0D9_9_9; 0d0; 0D0_0; 0d0_0_0; 0D0_0_8\n\n0b0; 0B11; 0B000; 0b010\n0b0; 0B1_1; 0B0_00; 0b01_0\n\n077; 0O0; 0o01; 0O777; 0o644\n0_7_7; 0O0; 0o0_1; 0O77_7; 0o6_44\n\n0x0; 0Xa0; 0X7FFF; 0xd3aD\n0x0; 0Xa_0; 0X7F_FF; 0xd3_aD\n\n\n4.2; 4.20; 88.0; 13.37\n4.2; 4.2_0; 8_8.0; 1_3.3_7\n\n0e10; 0.00e+10; 9e-10; 4.2E10; 40.0E+10; 0e100; 1010e+10\n0e1_0; 0.0_0e+10; 9e-1_0; 4.2E1_0; 4_0.0E+1_0; 0e1_0_0; 10_10e+10\n\n\n100r; 077r; 4.2r; 4.20r; 88.0r; 13.37r; 0d800r; 0B100r; 0o700r; 0XaB_cr\n1_00r; 0_7_7r; 4.2r; 4.2_0r; 88.0r; 1_3.3_7r; 0d8_0_0r; 0B1_00r; 0o70_0r; 0XaB_cr\n\n\n0i; 00i; 000i; 1234i; 077i; 0d08i; 0B11i; 0o77i; 13.37i\n0i; 0_0i; 0_0_0i; 12_34i; 0_77i; 0d0_8i; 0B1_1i; 0o7_7i; 13.3_7i\n\n1e100i; 13.37e08i; 13.37E-07i; 13.37e+09i\n1e1_0_0i; 1_3.3_7e0_8i; 1_3.3_7E-07i; 13.37e+0_9i\n\n\n100ri; 077ri; 4.2ri; 4.20ri; 88.0ri; 13.37ri; 0d800ri; 0B100ri; 0o700ri; 0XaB_cri\n1_00ri; 0_7_7ri; 4.2ri; 4.2_0ri; 88.0ri; 1_3.3_7ri; 0d8_0_0ri; 0B1_00ri; 0o70_0ri; 0XaB_cri\n\n\n# expressions containing numeric literals\n0..7; 1e1..2e1; 0b0.to_s\n\n# pseudo-expressions containing numeric literals\n0d100.0\n.0\n0.\n00.0\n\n# invalid pseudo-numeric expressions\n1__0\n1e_1\n1e1r\n08\n07e1\n0b1e1\n0I\n0R\n0ir' to be '1; 10; 999; 0; 00; 000\n1; 1_0; 9_9_9; 0; 0_0; 0_0_0\n\n0D1; 0d10; 0D999; 0d0; 0D00; 0d000; 0d008\n0D1; 0d1_0; 0D9_9_9; 0d0; 0D0_0; 0d0_0_0; 0D0_0_8\n\n0b0; 0B11; 0B000; 0b010\n0b0; 0B1_1; 0B0_00; 0b01_0\n\n077; 0O0; 0o01; 0O777; 0o644\n0_7_7; 0O0; 0o0_1; 0O77_7; 0o6_44\n\n0x0; 0Xa0; 0X7FFF; 0xd3aD\n0x0; 0Xa_0; 0X7F_FF; 0xd3_aD\n\n\n4.2; 4.20; 88.0; 13.37\n4.2; 4.2_0; 8_8.0; 1_3.3_7\n\n0e10; 0.00e+10; 9e-10; 4.2E10; 40.0E+10; 0e100; 1010e+10\n0e1_0; 0.0_0e+10; 9e-1_0; 4.2E1_0; 4_0.0E+1_0; 0e1_0_0; 10_10e+10\n\n\n100r; 077r; 4.2r; 4.20r; 88.0r; 13.37r; 0d800r; 0B100r; 0o700r; 0XaB_cr\n1_00r; 0_7_7r; 4.2r; 4.2_0r; 88.0r; 1_3.3_7r; 0d8_0_0r; 0B1_00r; 0o70_0r; 0XaB_cr\n\n\n0i; 00i; 000i; 1234i; 077i; 0d08i; 0B11i; 0o77i; 13.37i\n0i; 0_0i; 0_0_0i; 12_34i; 0_77i; 0d0_8i; 0B1_1i; 0o7_7i; 13.3_7i\n\n1e100i; 13.37e08i; 13.37E-07i; 13.37e+09i\n1e1_0_0i; 1_3.3_7e0_8i; 1_3.3_7E-07i; 13.37e+0_9i\n\n\n100ri; 077ri; 4.2ri; 4.20ri; 88.0ri; 13.37ri; 0d800ri; 0B100ri; 0o700ri; 0XaB_cri\n1_00ri; 0_7_7ri; 4.2ri; 4.2_0ri; 88.0ri; 1_3.3_7ri; 0d8_0_0ri; 0B1_00ri; 0o70_0ri; 0XaB_cri\n\n\n# expressions containing numeric literals\n0..7; 1e1..2e1; 0b0.to_s\n\n# pseudo-expressions containing numeric literals\n0d100.0\n.0\n0.\n00.0\n\n# invalid pseudo-numeric expressions\n1__0\n1e_1\n1e1r\n08\n07e1\n0b1e1\n0I\n0R\n0ir' - + expected - actual - - 1; 10; 999; 0; 00; 000 - 1; 1_0; 9_9_9; 0; 0_0; 0_0_0 - - -0D1; 0d10; 0D999; 0d0; 0D00; 0d000; 0d008 - -0D1; 0d1_0; 0D9_9_9; 0d0; 0D0_0; 0d0_0_0; 0D0_0_8 - +0D1; 0d10; 0D999; 0d0; 0D00; 0d000; 0d008 - +0D1; 0d1_0; 0D9_9_9; 0d0; 0D0_0; 0d0_0_0; 0D0_0_8 - - -0b0; 0B11; 0B000; 0b010 - -0b0; 0B1_1; 0B0_00; 0b01_0 - +0b0; 0B11; 0B000; 0b010 - +0b0; 0B1_1; 0B0_00; 0b01_0 - - -077; 0O0; 0o01; 0O777; 0o644 - -0_7_7; 0O0; 0o0_1; 0O77_7; 0o6_44 - +077; 0O0; 0o01; 0O777; 0o644 - +0_7_7; 0O0; 0o0_1; 0O77_7; 0o6_44 - - -0x0; 0Xa0; 0X7FFF; 0xd3aD - -0x0; 0Xa_0; 0X7F_FF; 0xd3_aD - +0x0; 0Xa0; 0X7FFF; 0xd3aD - +0x0; 0Xa_0; 0X7F_FF; 0xd3_aD - - - 4.2; 4.20; 88.0; 13.37 - 4.2; 4.2_0; 8_8.0; 1_3.3_7 - - -0e10; 0.00e+10; 9e-10; 4.2E10; 40.0E+10; 0e100; 1010e+10 - -0e1_0; 0.0_0e+10; 9e-1_0; 4.2E1_0; 4_0.0E+1_0; 0e1_0_0; 10_10e+10 - +0e10; 0.00e+10; 9e-10; 4.2E10; 40.0E+10; 0e100; 1010e+10 - +0e1_0; 0.0_0e+10; 9e-1_0; 4.2E1_0; 4_0.0E+1_0; 0e1_0_0; 10_10e+10 - - - -100r; 077r; 4.2r; 4.20r; 88.0r; 13.37r; 0d800r; 0B100r; 0o700r; 0XaB_cr - -1_00r; 0_7_7r; 4.2r; 4.2_0r; 88.0r; 1_3.3_7r; 0d8_0_0r; 0B1_00r; 0o70_0r; 0XaB_cr - +100r; 077r; 4.2r; 4.20r; 88.0r; 13.37r; 0d800r; 0B100r; 0o700r; 0XaB_cr - +1_00r; 0_7_7r; 4.2r; 4.2_0r; 88.0r; 1_3.3_7r; 0d8_0_0r; 0B1_00r; 0o70_0r; 0XaB_cr - - - -0i; 00i; 000i; 1234i; 077i; 0d08i; 0B11i; 0o77i; 13.37i - -0i; 0_0i; 0_0_0i; 12_34i; 0_77i; 0d0_8i; 0B1_1i; 0o7_7i; 13.3_7i - +0i; 00i; 000i; 1234i; 077i; 0d08i; 0B11i; 0o77i; 13.37i - +0i; 0_0i; 0_0_0i; 12_34i; 0_77i; 0d0_8i; 0B1_1i; 0o7_7i; 13.3_7i - - -1e100i; 13.37e08i; 13.37E-07i; 13.37e+09i - -1e1_0_0i; 1_3.3_7e0_8i; 1_3.3_7E-07i; 13.37e+0_9i - +1e100i; 13.37e08i; 13.37E-07i; 13.37e+09i - +1e1_0_0i; 1_3.3_7e0_8i; 1_3.3_7E-07i; 13.37e+0_9i - - - -100ri; 077ri; 4.2ri; 4.20ri; 88.0ri; 13.37ri; 0d800ri; 0B100ri; 0o700ri; 0XaB_cri - -1_00ri; 0_7_7ri; 4.2ri; 4.2_0ri; 88.0ri; 1_3.3_7ri; 0d8_0_0ri; 0B1_00ri; 0o70_0ri; 0XaB_cri - +100ri; 077ri; 4.2ri; 4.20ri; 88.0ri; 13.37ri; 0d800ri; 0B100ri; 0o700ri; 0XaB_cri - +1_00ri; 0_7_7ri; 4.2ri; 4.2_0ri; 88.0ri; 1_3.3_7ri; 0d8_0_0ri; 0B1_00ri; 0o70_0ri; 0XaB_cri - - - # expressions containing numeric literals - -0..7; 1e1..2e1; 0b0.to_s - +0..7; 1e1..2e1; 0b0.to_s - - # pseudo-expressions containing numeric literals - -0d100.0 - +0d100.0 - .0 - 0. - 00.0 - - # invalid pseudo-numeric expressions - -1__0 - -1e_1 - -1e1r - +1__0 - +1e_1 - +1e1r - 08 - -07e1 - +07e1 - 0b1e1 - 0I - 0R - 0ir - - at Assertion.fail (node_modules/should/cjs/should.js:275:17) - at Assertion.value (node_modules/should/cjs/should.js:356:19) - at /home/marat/Документы/highlight.js/test/markup/index.js:36:32 - - - - -> highlight.js@10.3.99 test /home/marat/Документы/highlight.js -> mocha test - - - - hljs - .IDENT_RE - ✓ should match non-underscore starting words - ✓ should not match underscore starting words - .UNDERSCORE_IDENT_RE - ✓ should match any word starting without numbers - ✓ should not match any word starting with numbers - .NUMBER_RE - ✓ should match regular numbers and decimals (112ms) - ✓ should not match hex or binary numbers - .C_NUMBER_RE - ✓ should match regular numbers (45ms) - ✓ should match decimals - ✓ should match hex numbers - ✓ should not match hex numbers greater than "f" - ✓ should not match binary numbers - .BINARY_NUMBER_RE - ✓ should match binary numbers - ✓ should not match binary numbers greater than 2 - .RE_STARTERS_RE - ✓ should match boolean operators - ✓ should match arithmetic operators - ✓ should match binary operators - ✓ should match miscellaneous operators - .getLanguage() - ✓ should get an existing language - ✓ should get an existing language by alias - ✓ should be case insensitive - ✓ should return undefined - ✓ should not break on undefined - ✓ should get the csharp language by c# alias - ✓ should not succeed for constructor - ✓ should not succeed for __proto__ - .autoDetection() - ✓ should get an existing language - ✓ should get an existing language by alias - ✓ should be case insensitive - ✓ should return undefined - ✓ should not break on undefined - .highlight() - ✓ should works without continuation - .fixmarkup() - ✓ should not strip HTML from beginning of strings - ✓ should not add "undefined" to the beginning of the result (#1452) - computing the relevance score of a language - ✓ should ignore common keywords - ✓ should not ignore weighted common keywords - ✓ should not ignore weighted common keywords (if 1 is forced) - .registerAliases() - ✓ should get an existing language by alias - ✓ should get an existing language by aliases - - hljs - parser specifics - a grammar with look-ahead end matchers - ✓ should match successfully - bugs - resume scan when a match is ignored - ✓ should continue to highlight later matches - ✓ BUT should not skip ahead too far - bugs - modes containing 'endsWithParent' - ✓ should be allowed to be reused - bugs - a grammar with a mode that makes a 0 width match - ✓ should instead count it as a 1 character match - - hljs.highlightAuto() - ✓ adding dynamic tests... - - highlight() markup - ✓ adding dynamic tests... - - special cases tests - explicit language class - ✓ should highlight block with language in code tag - ✓ should highlight block with language in pre tag - ✓ should highlight using html 5 style (language-*) - ✓ should highlight with shortened prefix (lang-) - ✓ should highlight if classname contains uppercase symbols - custom markup - ✓ should replace tabs - ✓ should keep custom markup - ✓ should keep custom markup and replace tabs - ✓ should keep the same amount of void elements (
,
, ...) - language alias - ✓ should highlight as aliased language - no highlighting - ✓ should keep block unchanged (nohighlight) - ✓ should keep block unchanged (no-highlight) - ✓ should skip pre tags without a child code tag - ✓ should keep block unchanged (unsupported language) - ✓ should keep block unchanged (unsupported lang) - ✓ should keep block unchanged (unsupported prefixed language) - sub-languages - ✓ should highlight XML with PHP and JavaScript - block class names - ✓ should add language class name to block - ✓ should not clutter block class (first) - ✓ should not clutter block class (last) - ✓ should not clutter block class (spaces around) - use br - ✓ should respect
tags - ✓ should ignore literal new lines - ✓ should recognize xml-style
- ends with parent variants - ✓ should end on all variants - - hljs.highlightAuto() - ✓ should be detected as 1c (264ms) - ✓ should be detected as abnf (116ms) - ✓ should be detected as accesslog (64ms) - ✓ should be detected as actionscript (215ms) - ✓ should be detected as ada (53ms) - ✓ should be detected as angelscript (166ms) - ✓ should be detected as apache (76ms) - ✓ should be detected as applescript (68ms) - ✓ should be detected as arcade (97ms) - ✓ should be detected as cpp (191ms) - ✓ should be detected as arduino (91ms) - ✓ should be detected as armasm (83ms) - ✓ should be detected as xml (127ms) - ✓ should be detected as asciidoc (90ms) - ✓ should be detected as aspectj (104ms) - ✓ should be detected as autohotkey (67ms) - ✓ should be detected as autoit (65ms) - ✓ should be detected as avrasm (72ms) - ✓ should be detected as awk (83ms) - ✓ should be detected as axapta (53ms) - ✓ should be detected as bash (52ms) - ✓ should be detected as basic (80ms) - ✓ should be detected as bnf (74ms) - ✓ should be detected as brainfuck (72ms) - ✓ should be detected as cal (75ms) - ✓ should be detected as capnproto (116ms) - ✓ should be detected as ceylon (42ms) - ✓ should be detected as clean (62ms) - ✓ should be detected as clojure (57ms) - ✓ should be detected as clojure-repl - ✓ should be detected as cmake (58ms) - ✓ should be detected as coffeescript (68ms) - ✓ should be detected as coq (77ms) - ✓ should be detected as cos (87ms) - ✓ should be detected as crmsh (114ms) - ✓ should be detected as crystal (80ms) - ✓ should be detected as csharp (68ms) - ✓ should be detected as csp - ✓ should be detected as css (46ms) - ✓ should be detected as d (84ms) - ✓ should be detected as markdown (65ms) - ✓ should be detected as dart (104ms) - ✓ should be detected as delphi (138ms) - ✓ should be detected as diff (215ms) - ✓ should be detected as django (154ms) - ✓ should be detected as dns (293ms) - ✓ should be detected as dockerfile (143ms) - ✓ should be detected as dos (44ms) - ✓ should be detected as dsconfig (78ms) - ✓ should be detected as dts (175ms) - ✓ should be detected as dust - ✓ should be detected as ebnf (100ms) - ✓ should be detected as elixir (81ms) - ✓ should be detected as elm (53ms) - ✓ should be detected as ruby (43ms) - ✓ should be detected as erb (53ms) - ✓ should be detected as erlang-repl (83ms) - ✓ should be detected as erlang (101ms) - ✓ should be detected as excel - ✓ should be detected as fix (195ms) - ✓ should be detected as flix (84ms) - ✓ should be detected as fortran (47ms) - ✓ should be detected as fsharp (85ms) - ✓ should be detected as gams (94ms) - ✓ should be detected as gauss (64ms) - ✓ should be detected as gcode (96ms) - ✓ should be detected as gherkin (50ms) - ✓ should be detected as glsl (59ms) - ✓ should be detected as gml (40ms) - ✓ should be detected as go (99ms) - ✓ should be detected as golo - ✓ should be detected as gradle (104ms) - ✓ should be detected as groovy (95ms) - ✓ should be detected as haml (46ms) - ✓ should be detected as handlebars (38ms) - ✓ should be detected as haskell (73ms) - ✓ should be detected as haxe (167ms) - ✓ should be detected as hsp (56ms) - ✓ should be detected as http (158ms) - ✓ should be detected as hy (96ms) - ✓ should be detected as inform7 (89ms) - ✓ should be detected as ini (62ms) - ✓ should be detected as irpf90 (155ms) - ✓ should be detected as isbl (195ms) - ✓ should be detected as java (71ms) - ✓ should be detected as javascript (142ms) - ✓ should be detected as javascript-repl - ✓ should be detected as jboss-cli (41ms) - ✓ should be detected as json (47ms) - ✓ should be detected as julia (146ms) - ✓ should be detected as julia-repl (80ms) - ✓ should be detected as kotlin - ✓ should be detected as lasso (110ms) - ✓ should be detected as latex (68ms) - ✓ should be detected as ldif (108ms) - ✓ should be detected as leaf (48ms) - ✓ should be detected as less (113ms) - ✓ should be detected as lisp (61ms) - ✓ should be detected as livecodeserver (78ms) - ✓ should be detected as livescript (147ms) - ✓ should be detected as llvm (296ms) - ✓ should be detected as lsl - ✓ should be detected as lua (58ms) - ✓ should be detected as makefile (38ms) - ✓ should be detected as mathematica (42ms) - ✓ should be detected as matlab (142ms) - ✓ should be detected as maxima (119ms) - ✓ should be detected as mel (54ms) - ✓ should be detected as mercury (69ms) - ✓ should be detected as mipsasm (61ms) - ✓ should be detected as mizar (167ms) - ✓ should be detected as perl (109ms) - ✓ should be detected as mojolicious (82ms) - ✓ should be detected as monkey (65ms) - ✓ should be detected as moonscript (84ms) - ✓ should be detected as n1ql (53ms) - ✓ should be detected as nginx (83ms) - ✓ should be detected as nim (52ms) - ✓ should be detected as nix (63ms) - ✓ should be detected as nsis (64ms) - ✓ should be detected as objectivec - ✓ should be detected as ocaml (60ms) - ✓ should be detected as openscad (56ms) - ✓ should be detected as oxygene (67ms) - ✓ should be detected as parser3 (59ms) - ✓ should be detected as pf (65ms) - ✓ should be detected as pgsql (45ms) - ✓ should be detected as php (78ms) - ✓ should be detected as php-template - ✓ should be detected as pony - ✓ should be detected as powershell (40ms) - ✓ should be detected as processing (42ms) - ✓ should be detected as profile (57ms) - ✓ should be detected as prolog - ✓ should be detected as properties - ✓ should be detected as protobuf (57ms) - ✓ should be detected as puppet (69ms) - ✓ should be detected as purebasic (77ms) - ✓ should be detected as python (43ms) - ✓ should be detected as python-repl - ✓ should be detected as q (61ms) - ✓ should be detected as qml (101ms) - ✓ should be detected as r (107ms) - ✓ should be detected as reasonml (54ms) - ✓ should be detected as rib (85ms) - ✓ should be detected as roboconf (59ms) - ✓ should be detected as routeros (59ms) - ✓ should be detected as rsl (41ms) - ✓ should be detected as ruleslanguage (96ms) - ✓ should be detected as rust - ✓ should be detected as sas (83ms) - ✓ should be detected as scala (137ms) - ✓ should be detected as scheme (56ms) - ✓ should be detected as scilab (45ms) - ✓ should be detected as scss (92ms) - ✓ should be detected as shell - ✓ should be detected as smali (115ms) - ✓ should be detected as smalltalk (63ms) - ✓ should be detected as sml - ✓ should be detected as sqf (43ms) - ✓ should be detected as sql (48ms) - ✓ should be detected as stan (97ms) - ✓ should be detected as stata (54ms) - ✓ should be detected as step21 (116ms) - ✓ should be detected as stylus (46ms) - ✓ should be detected as subunit (134ms) - ✓ should be detected as swift (39ms) - ✓ should be detected as taggerscript (50ms) - ✓ should be detected as yaml (46ms) - ✓ should be detected as tap (71ms) - ✓ should be detected as tcl (64ms) - ✓ should be detected as thrift (56ms) - ✓ should be detected as tp (403ms) - ✓ should be detected as twig (46ms) - ✓ should be detected as typescript - ✓ should be detected as vala (84ms) - ✓ should be detected as vbnet (58ms) - ✓ should be detected as vbscript (58ms) - ✓ should be detected as vbscript-html - ✓ should be detected as verilog (69ms) - ✓ should be detected as vhdl (68ms) - ✓ should be detected as vim - ✓ should be detected as x86asm (76ms) - ✓ should be detected as xl (75ms) - ✓ should be detected as xquery (152ms) - ✓ should be detected as zephir (108ms) - - abnf - ✓ should markup default - - accesslog - ✓ should markup default - - actionscript - ✓ should markup method-call - - arcade - ✓ should markup profile - - arduino - ✓ should markup default - - armasm - ✓ should markup default - - aspectj - ✓ should markup intertype-constructor - ✓ should markup intertype-method - - bash - ✓ should markup arithmetic - ✓ should markup escaped-quote - ✓ should markup no-numbers - ✓ should markup strings - ✓ should markup token-containing-keyword - ✓ should markup variables - - ceylon - ✓ should markup nested-comments - - clojure - ✓ should markup globals_definition - ✓ should markup hint_col - ✓ should markup symbols-numbers - - clojure-repl - ✓ should markup prompt - - coffeescript - ✓ should markup division - ✓ should markup freeze_bug - ✓ should markup function - ✓ should markup regex - - cos - ✓ should markup basic - ✓ should markup embedded - - cpp - ✓ should markup expression-keywords - ✓ should markup function-declarations - ✓ should markup function-params - ✓ should markup function-title - ✓ should markup number-literals - ✓ should markup pointers-returns - ✓ should markup preprocessor - ✓ should markup primitive-types - ✓ should markup string-literals - ✓ should markup template_complexity - ✓ should markup truncated-block-comment - ✓ should markup truncated-raw-string - - crystal - ✓ should markup defs - ✓ should markup literals - ✓ should markup macro - ✓ should markup operators - ✓ should markup regexes - ✓ should markup toplevel-keywords - - csharp - ✓ should markup dotted-namespace - ✓ should markup floats - ✓ should markup functions - ✓ should markup generic_modifiers - ✓ should markup identifiers - ✓ should markup records - ✓ should markup string-interpolation - ✓ should markup titles - - css - ✓ should markup pseudo-selector - ✓ should markup sample - ✓ should markup url - - dart - ✓ should markup comment-markdown - ✓ should markup string-interpolation - - delphi - ✓ should markup compiler-directive - - diff - ✓ should markup comments - - dockerfile - ✓ should markup default - - dos - ✓ should markup comments - - dsconfig - ✓ should markup default - - ebnf - ✓ should markup quote-symbols - ✓ should markup terminators - ✓ should markup underscore-production - - elixir - ✓ should markup function-not-regex - ✓ should markup function-title - ✓ should markup numbers - ✓ should markup sigils - ✓ should markup strings - ✓ should markup uppercase-string-sigil - - erlang - ✓ should markup numbers - - excel - ✓ should markup comments - - fortran - ✓ should markup comments - ✓ should markup numbers - - fsharp - ✓ should markup bang-keywords - ✓ should markup comments - - gauss - ✓ should markup function_defs - ✓ should markup function_refs - ✓ should markup keywords - - go - ✓ should markup functions - ✓ should markup numbers - ✓ should markup strings - - golo - ✓ should markup default - - groovy - ✓ should markup default - ✓ should markup oneoffs - - handlebars - ✓ should markup block-expression-variants-as-path-segment - ✓ should markup block-expression-variants-in-helper-name - ✓ should markup block-expression-variants-in-param - ✓ should markup block-parameters-as - ✓ should markup block-with-param - ✓ should markup block - ✓ should markup built-ins - ✓ should markup combinations-with-text - ✓ should markup comments - ✓ should markup else-variants - ✓ should markup escaped-mustaches - ✓ should markup expression-variants - ✓ should markup hashes - ✓ should markup if-else - ✓ should markup literals-in-different-places - ✓ should markup literals - ✓ should markup partial-call - ✓ should markup path-expressions - ✓ should markup raw-block - ✓ should markup simple-expression - ✓ should markup sub-expressions - ✓ should markup triple-mustache - - haskell - ✓ should markup infix - ✓ should markup nested-comments - - http - ✓ should markup default - - ini - ✓ should markup array - ✓ should markup comments - ✓ should markup keys - ✓ should markup tables - ✓ should markup types - ✓ should markup variable - - java - ✓ should markup annotations - ✓ should markup gh1031 - ✓ should markup numbers - ✓ should markup titles - - javascript - ✓ should markup arrow-function - ✓ should markup class - ✓ should markup comments - ✓ should markup default-parameters - ✓ should markup inline-languages - ✓ should markup jsdoc - ✓ should markup jsx-fragment - ✓ should markup jsx - ✓ should markup keyword_as_identifier - ✓ should markup keyword-as-part-of-method-name - ✓ should markup keywords - ✓ should markup method-call - ✓ should markup modules - ✓ should markup numbers - ✓ should markup object-attr - ✓ should markup regex - ✓ should markup shebang - ✓ should markup template-strings - - javascript-repl - 1) should markup sample - - json - ✓ should markup comments - - kotlin - ✓ should markup class - ✓ should markup function - ✓ should markup nested_comment - ✓ should markup string - - lasso - ✓ should markup delimiters - - latex - ✓ should markup chars - ✓ should markup comments - ✓ should markup control_sequences - ✓ should markup parameters - ✓ should markup verbatim - - ldif - ✓ should markup ldapmodify - ✓ should markup schema - - less - ✓ should markup selectors - - lisp - ✓ should markup mec - - markdown - ✓ should markup bold_italics - ✓ should markup code - ✓ should markup list - ✓ should markup sections - - matlab - ✓ should markup block_comment - ✓ should markup transpose - - maxima - ✓ should markup example - ✓ should markup numbers - ✓ should markup symbols - - objectivec - ✓ should markup preprocessor - ✓ should markup string-literals - - ocaml - ✓ should markup literals - ✓ should markup types - - pgsql - ✓ should markup clauses - ✓ should markup clauses2 - ✓ should markup constraints - ✓ should markup dollar_strings - ✓ should markup options - ✓ should markup plpgsql - ✓ should markup sql-commands - ✓ should markup window-functions - ✓ should markup xml - - php - 2) should markup comments - ✓ should markup strings - - pony - ✓ should markup control-flow - ✓ should markup creator - ✓ should markup iterface-trait - ✓ should markup lambda - ✓ should markup match - ✓ should markup method - ✓ should markup number-literals - ✓ should markup objects - ✓ should markup prime - ✓ should markup triple-quote - - powershell - ✓ should markup apos-herestring - ✓ should markup classes - ✓ should markup misc - ✓ should markup quote-herestring - - properties - ✓ should markup syntax - - protobuf - ✓ should markup message-message - ✓ should markup rpc - - python - ✓ should markup escaped-quotes - ✓ should markup f-strings - ✓ should markup function-header-comments - ✓ should markup function-header - ✓ should markup keywords - ✓ should markup matrix-multiplication - ✓ should markup numbers - - python-repl - ✓ should markup sample - - r - ✓ should markup names - ✓ should markup numbers - ✓ should markup roxygen - ✓ should markup strings - - reasonml - ✓ should markup functions - ✓ should markup literals - ✓ should markup modules - ✓ should markup pattern-matching - - ruby - ✓ should markup gemfile - ✓ should markup heredoc - 3) should markup numbers - ✓ should markup prompt - ✓ should markup regexes - - rust - ✓ should markup comments - ✓ should markup numbers - ✓ should markup strings - ✓ should markup traits - ✓ should markup types - ✓ should markup variables - - scala - ✓ should markup case-classes - - scheme - ✓ should markup lambda - ✓ should markup quoted - - shell - ✓ should markup plain-prompt - ✓ should markup prompt-with-slash - - sql - ✓ should markup interval - ✓ should markup join - ✓ should markup keywords - ✓ should markup lateral-view - ✓ should markup numeric-types - ✓ should markup set-operator - ✓ should markup string-types - ✓ should markup tablesample - ✓ should markup values-statement - ✓ should markup window-function - - stata - ✓ should markup built_ins - - subunit - ✓ should markup subunit-errorline - ✓ should markup subunit-failureline - ✓ should markup subunit-progressline - ✓ should markup subunit-skipline - ✓ should markup subunit-successline - ✓ should markup subunit-tagline - ✓ should markup subunit-testline - ✓ should markup subunit-timeline - ✓ should markup subunit-uxsuccessline - ✓ should markup subunit-xfailline - - swift - ✓ should markup functions - ✓ should markup multiline-string - - tap - ✓ should markup basic - ✓ should markup without-numbers - ✓ should markup yaml-block - - twig - ✓ should markup filter_with_underscore - ✓ should markup template_tags - - typescript - ✓ should markup class - ✓ should markup declares - ✓ should markup decorator-factories - ✓ should markup functions - ✓ should markup identifiers_that_include_keywords - ✓ should markup inline-languages - ✓ should markup jsx - ✓ should markup module-id - ✓ should markup nested-templates - ✓ should markup numbers-and-dashes - ✓ should markup numbers - - verilog - ✓ should markup misc - ✓ should markup numbers - - vim - ✓ should markup strings-comments - - x86asm - ✓ should markup labels-directives - - xml - ✓ should markup document-type-variations - ✓ should markup space-attributes - ✓ should markup sublanguage_no_relevancy - ✓ should markup unquoted-attributes - - xquery - ✓ should markup computed_inbuilt - ✓ should markup direct_method - ✓ should markup function_body - ✓ should markup prolog_declarations - - yaml - ✓ should markup block - ✓ should markup inline - ✓ should markup keys - ✓ should markup numbers - ✓ should markup string - ✓ should markup tag - - zephir - ✓ should markup default - - - 538 passing (19s) - 3 failing - - 1) javascript-repl - should markup sample: - - AssertionError: expected '> for(let i=0;i<5;i++){\n... console.log(i);\n... }\n0\n1\n2\n3\n4\nundefined\n>' to be '> for(let i=0;i<5;i++){\\nn... console.log(i);\\nn... }\\nn0\\nn1\\nn2\\nn3\\nn4\\nnundefined\\nn>\' to be \'> for(let i=0;i<5;i++){\\\\nn... console.log(i);\\\\nn... }\\\\nn0\\\\nn1\\\\nn2\\\\nn3\\\\nn4\\\\nnundefined\\\\nn>\\\' to be \\\'> for(let i=0;i<5;i++){\\\\nn... console.log(i);\\\\nn... }\\\\nn0\\\\nn1\\\\nn2\\\\nn3\\\\nn4\\\\nnundefined\\\\nn>' - + expected - actual - - -> for(let i=0;i<5;i++){ - -... console.log(i); - -... } - -0 - -1 - -2 - -3 - -4 - -undefined - -> - +> for(let i=0;i<5;i++){\nn... console.log(i);\nn... }\nn0\nn1\nn2\nn3\nn4\nnundefined\nn>' to be '> for(let i=0;i<5;i++){\\nn... console.log(i);\\nn... }\\nn0\\nn1\\nn2\\nn3\\nn4\\nnundefined\\nn>\' to be \'> for(let i=0;i<5;i++){\\nn... console.log(i);\\nn... }\\nn0\\nn1\\nn2\\nn3\\nn4\\nnundefined\\nn> - - at Assertion.fail (node_modules/should/cjs/should.js:275:17) - at Assertion.value (node_modules/should/cjs/should.js:356:19) - at /home/marat/Документы/highlight.js/test/markup/index.js:36:32 - - 2) php - should markup comments: - - AssertionError: expected '<?php\n\n/**\n * @param int $a\n * @return bool\n */\nfunction isEven($a) {\n return ($a % 2) === 0;\n}\n\n/**\n * TODO: Rely on isEven, but do not highlight bug.\n *\n * @param int $a\n * @return bool\n */\nfunction isOdd($a) {\n return ($a % 2) === 1;\n}' to be '<?php\n\n/**\n * @param int $a\n * @return bool\n */\nfunction isEven($a) {\n return ($a % 2) === 0;\n}\n\n/**\n * TODO: Rely on isEven, but do not highlight bug.\n *\n * @param int $a\n * @return bool\n */\nfunction isOdd($a) {\n return ($a % 2) === 1;\n}' - + expected - actual - - /** - * @param int $a - * @return bool - */ - -function isEven($a) { - - return ($a % 2) === 0; - +function isEven($a) { - + return ($a % 2) === 0; - } - - /** - * TODO: Rely on isEven, but do not highlight bug. - * - * @param int $a - * @return bool - */ - -function isOdd($a) { - - return ($a % 2) === 1; - +function isOdd($a) { - + return ($a % 2) === 1; - } - - at Assertion.fail (node_modules/should/cjs/should.js:275:17) - at Assertion.value (node_modules/should/cjs/should.js:356:19) - at /home/marat/Документы/highlight.js/test/markup/index.js:36:32 - - 3) ruby - should markup numbers: - - AssertionError: expected '1; 10; 999; 0; 00; 000\n1; 1_0; 9_9_9; 0; 0_0; 0_0_0\n\n0D1; 0d10; 0D999; 0d0; 0D00; 0d000; 0d008\n0D1; 0d1_0; 0D9_9_9; 0d0; 0D0_0; 0d0_0_0; 0D0_0_8\n\n0b0; 0B11; 0B000; 0b010\n0b0; 0B1_1; 0B0_00; 0b01_0\n\n077; 0O0; 0o01; 0O777; 0o644\n0_7_7; 0O0; 0o0_1; 0O77_7; 0o6_44\n\n0x0; 0Xa0; 0X7FFF; 0xd3aD\n0x0; 0Xa_0; 0X7F_FF; 0xd3_aD\n\n\n4.2; 4.20; 88.0; 13.37\n4.2; 4.2_0; 8_8.0; 1_3.3_7\n\n0e10; 0.00e+10; 9e-10; 4.2E10; 40.0E+10; 0e100; 1010e+10\n0e1_0; 0.0_0e+10; 9e-1_0; 4.2E1_0; 4_0.0E+1_0; 0e1_0_0; 10_10e+10\n\n\n100r; 077r; 4.2r; 4.20r; 88.0r; 13.37r; 0d800r; 0B100r; 0o700r; 0XaB_cr\n1_00r; 0_7_7r; 4.2r; 4.2_0r; 88.0r; 1_3.3_7r; 0d8_0_0r; 0B1_00r; 0o70_0r; 0XaB_cr\n\n\n0i; 00i; 000i; 1234i; 077i; 0d08i; 0B11i; 0o77i; 13.37i\n0i; 0_0i; 0_0_0i; 12_34i; 0_77i; 0d0_8i; 0B1_1i; 0o7_7i; 13.3_7i\n\n1e100i; 13.37e08i; 13.37E-07i; 13.37e+09i\n1e1_0_0i; 1_3.3_7e0_8i; 1_3.3_7E-07i; 13.37e+0_9i\n\n\n100ri; 077ri; 4.2ri; 4.20ri; 88.0ri; 13.37ri; 0d800ri; 0B100ri; 0o700ri; 0XaB_cri\n1_00ri; 0_7_7ri; 4.2ri; 4.2_0ri; 88.0ri; 1_3.3_7ri; 0d8_0_0ri; 0B1_00ri; 0o70_0ri; 0XaB_cri\n\n\n# expressions containing numeric literals\n0..7; 1e1..2e1; 0b0.to_s\n\n# pseudo-expressions containing numeric literals\n0d100.0\n.0\n0.\n00.0\n\n# invalid pseudo-numeric expressions\n1__0\n1e_1\n1e1r\n08\n07e1\n0b1e1\n0I\n0R\n0ir' to be '1; 10; 999; 0; 00; 000\n1; 1_0; 9_9_9; 0; 0_0; 0_0_0\n\n0D1; 0d10; 0D999; 0d0; 0D00; 0d000; 0d008\n0D1; 0d1_0; 0D9_9_9; 0d0; 0D0_0; 0d0_0_0; 0D0_0_8\n\n0b0; 0B11; 0B000; 0b010\n0b0; 0B1_1; 0B0_00; 0b01_0\n\n077; 0O0; 0o01; 0O777; 0o644\n0_7_7; 0O0; 0o0_1; 0O77_7; 0o6_44\n\n0x0; 0Xa0; 0X7FFF; 0xd3aD\n0x0; 0Xa_0; 0X7F_FF; 0xd3_aD\n\n\n4.2; 4.20; 88.0; 13.37\n4.2; 4.2_0; 8_8.0; 1_3.3_7\n\n0e10; 0.00e+10; 9e-10; 4.2E10; 40.0E+10; 0e100; 1010e+10\n0e1_0; 0.0_0e+10; 9e-1_0; 4.2E1_0; 4_0.0E+1_0; 0e1_0_0; 10_10e+10\n\n\n100r; 077r; 4.2r; 4.20r; 88.0r; 13.37r; 0d800r; 0B100r; 0o700r; 0XaB_cr\n1_00r; 0_7_7r; 4.2r; 4.2_0r; 88.0r; 1_3.3_7r; 0d8_0_0r; 0B1_00r; 0o70_0r; 0XaB_cr\n\n\n0i; 00i; 000i; 1234i; 077i; 0d08i; 0B11i; 0o77i; 13.37i\n0i; 0_0i; 0_0_0i; 12_34i; 0_77i; 0d0_8i; 0B1_1i; 0o7_7i; 13.3_7i\n\n1e100i; 13.37e08i; 13.37E-07i; 13.37e+09i\n1e1_0_0i; 1_3.3_7e0_8i; 1_3.3_7E-07i; 13.37e+0_9i\n\n\n100ri; 077ri; 4.2ri; 4.20ri; 88.0ri; 13.37ri; 0d800ri; 0B100ri; 0o700ri; 0XaB_cri\n1_00ri; 0_7_7ri; 4.2ri; 4.2_0ri; 88.0ri; 1_3.3_7ri; 0d8_0_0ri; 0B1_00ri; 0o70_0ri; 0XaB_cri\n\n\n# expressions containing numeric literals\n0..7; 1e1..2e1; 0b0.to_s\n\n# pseudo-expressions containing numeric literals\n0d100.0\n.0\n0.\n00.0\n\n# invalid pseudo-numeric expressions\n1__0\n1e_1\n1e1r\n08\n07e1\n0b1e1\n0I\n0R\n0ir' - + expected - actual - - 1; 10; 999; 0; 00; 000 - 1; 1_0; 9_9_9; 0; 0_0; 0_0_0 - - -0D1; 0d10; 0D999; 0d0; 0D00; 0d000; 0d008 - -0D1; 0d1_0; 0D9_9_9; 0d0; 0D0_0; 0d0_0_0; 0D0_0_8 - +0D1; 0d10; 0D999; 0d0; 0D00; 0d000; 0d008 - +0D1; 0d1_0; 0D9_9_9; 0d0; 0D0_0; 0d0_0_0; 0D0_0_8 - - -0b0; 0B11; 0B000; 0b010 - -0b0; 0B1_1; 0B0_00; 0b01_0 - +0b0; 0B11; 0B000; 0b010 - +0b0; 0B1_1; 0B0_00; 0b01_0 - - -077; 0O0; 0o01; 0O777; 0o644 - -0_7_7; 0O0; 0o0_1; 0O77_7; 0o6_44 - +077; 0O0; 0o01; 0O777; 0o644 - +0_7_7; 0O0; 0o0_1; 0O77_7; 0o6_44 - - -0x0; 0Xa0; 0X7FFF; 0xd3aD - -0x0; 0Xa_0; 0X7F_FF; 0xd3_aD - +0x0; 0Xa0; 0X7FFF; 0xd3aD - +0x0; 0Xa_0; 0X7F_FF; 0xd3_aD - - - 4.2; 4.20; 88.0; 13.37 - 4.2; 4.2_0; 8_8.0; 1_3.3_7 - - -0e10; 0.00e+10; 9e-10; 4.2E10; 40.0E+10; 0e100; 1010e+10 - -0e1_0; 0.0_0e+10; 9e-1_0; 4.2E1_0; 4_0.0E+1_0; 0e1_0_0; 10_10e+10 - +0e10; 0.00e+10; 9e-10; 4.2E10; 40.0E+10; 0e100; 1010e+10 - +0e1_0; 0.0_0e+10; 9e-1_0; 4.2E1_0; 4_0.0E+1_0; 0e1_0_0; 10_10e+10 - - - -100r; 077r; 4.2r; 4.20r; 88.0r; 13.37r; 0d800r; 0B100r; 0o700r; 0XaB_cr - -1_00r; 0_7_7r; 4.2r; 4.2_0r; 88.0r; 1_3.3_7r; 0d8_0_0r; 0B1_00r; 0o70_0r; 0XaB_cr - +100r; 077r; 4.2r; 4.20r; 88.0r; 13.37r; 0d800r; 0B100r; 0o700r; 0XaB_cr - +1_00r; 0_7_7r; 4.2r; 4.2_0r; 88.0r; 1_3.3_7r; 0d8_0_0r; 0B1_00r; 0o70_0r; 0XaB_cr - - - -0i; 00i; 000i; 1234i; 077i; 0d08i; 0B11i; 0o77i; 13.37i - -0i; 0_0i; 0_0_0i; 12_34i; 0_77i; 0d0_8i; 0B1_1i; 0o7_7i; 13.3_7i - +0i; 00i; 000i; 1234i; 077i; 0d08i; 0B11i; 0o77i; 13.37i - +0i; 0_0i; 0_0_0i; 12_34i; 0_77i; 0d0_8i; 0B1_1i; 0o7_7i; 13.3_7i - - -1e100i; 13.37e08i; 13.37E-07i; 13.37e+09i - -1e1_0_0i; 1_3.3_7e0_8i; 1_3.3_7E-07i; 13.37e+0_9i - +1e100i; 13.37e08i; 13.37E-07i; 13.37e+09i - +1e1_0_0i; 1_3.3_7e0_8i; 1_3.3_7E-07i; 13.37e+0_9i - - - -100ri; 077ri; 4.2ri; 4.20ri; 88.0ri; 13.37ri; 0d800ri; 0B100ri; 0o700ri; 0XaB_cri - -1_00ri; 0_7_7ri; 4.2ri; 4.2_0ri; 88.0ri; 1_3.3_7ri; 0d8_0_0ri; 0B1_00ri; 0o70_0ri; 0XaB_cri - +100ri; 077ri; 4.2ri; 4.20ri; 88.0ri; 13.37ri; 0d800ri; 0B100ri; 0o700ri; 0XaB_cri - +1_00ri; 0_7_7ri; 4.2ri; 4.2_0ri; 88.0ri; 1_3.3_7ri; 0d8_0_0ri; 0B1_00ri; 0o70_0ri; 0XaB_cri - - - # expressions containing numeric literals - -0..7; 1e1..2e1; 0b0.to_s - +0..7; 1e1..2e1; 0b0.to_s - - # pseudo-expressions containing numeric literals - -0d100.0 - +0d100.0 - .0 - 0. - 00.0 - - # invalid pseudo-numeric expressions - -1__0 - -1e_1 - -1e1r - +1__0 - +1e_1 - +1e1r - 08 - -07e1 - +07e1 - 0b1e1 - 0I - 0R - 0ir - - at Assertion.fail (node_modules/should/cjs/should.js:275:17) - at Assertion.value (node_modules/should/cjs/should.js:356:19) - at /home/marat/Документы/highlight.js/test/markup/index.js:36:32 - - - diff --git a/test/markup/index.js b/test/markup/index.js index 35af27934b..d71b40fa9d 100644 --- a/test/markup/index.js +++ b/test/markup/index.js @@ -31,7 +31,7 @@ function testLanguage(language, {testDir}) { // Uncomment this for major changes that rewrite the test expectations // which will then need to be manually compared by hand of course - require('fs').writeFileSync(filename, actual); + //require('fs').writeFileSync(filename, actual); actual.trim().should.equal(expected.trim()); done();