summaryrefslogtreecommitdiff
path: root/tests/examplefiles
diff options
context:
space:
mode:
authorChristopher Trudeau <ctrudeau@arsensa.com>2021-05-29 16:03:44 -0400
committerChristopher Trudeau <ctrudeau@arsensa.com>2021-05-29 16:03:44 -0400
commit18a7fdb2ce1695e471071f7d635cb98de6080ee8 (patch)
treeaeafaf9ee5ecaefaa7e866ad6756ca69d693bbac /tests/examplefiles
parente8803c5e756bf2f78d913d546348bfd2987c918d (diff)
downloadpygments-git-18a7fdb2ce1695e471071f7d635cb98de6080ee8.tar.gz
Add JavaScript Node.js Console Lexer
Diffstat (limited to 'tests/examplefiles')
-rw-r--r--tests/examplefiles/nodecon/nodecod_test.nodecon20
-rw-r--r--tests/examplefiles/nodecon/nodecod_test.nodecon.output112
2 files changed, 132 insertions, 0 deletions
diff --git a/tests/examplefiles/nodecon/nodecod_test.nodecon b/tests/examplefiles/nodecon/nodecod_test.nodecon
new file mode 100644
index 00000000..1442b6f5
--- /dev/null
+++ b/tests/examplefiles/nodecon/nodecod_test.nodecon
@@ -0,0 +1,20 @@
+// Node.js Console Session
+> let a = 3
+undefined
+> a
+3
+> let b = '4'
+undefined
+> b
+'4'
+> b == a
+false
+> b === a
+false
+> if(a) {
+... console.log(a)
+... }
+3
+undefined
+> c
+Uncaught ReferenceError: c is not defined
diff --git a/tests/examplefiles/nodecon/nodecod_test.nodecon.output b/tests/examplefiles/nodecon/nodecod_test.nodecon.output
new file mode 100644
index 00000000..a812407a
--- /dev/null
+++ b/tests/examplefiles/nodecon/nodecod_test.nodecon.output
@@ -0,0 +1,112 @@
+'' Text
+'// Node.js Console Session\n' Comment.Single
+
+'> ' Generic.Prompt
+'let' Keyword.Declaration
+' ' Text
+'a' Name.Other
+' ' Text
+'=' Operator
+' ' Text
+'3' Literal.Number.Float
+'\n' Text
+
+'undefined' Keyword.Constant
+'\n' Text
+
+'> ' Generic.Prompt
+'a' Name.Other
+'\n' Text
+
+'3' Literal.Number.Float
+'\n' Text
+
+'> ' Generic.Prompt
+'let' Keyword.Declaration
+' ' Text
+'b' Name.Other
+' ' Text
+'=' Operator
+' ' Text
+"'4'" Literal.String.Single
+'\n' Text
+
+'undefined' Keyword.Constant
+'\n' Text
+
+'> ' Generic.Prompt
+'b' Name.Other
+'\n' Text
+
+"'4'" Literal.String.Single
+'\n' Text
+
+'> ' Generic.Prompt
+'b' Name.Other
+' ' Text
+'==' Operator
+' ' Text
+'a' Name.Other
+'\n' Text
+
+'false' Keyword.Constant
+'\n' Text
+
+'> ' Generic.Prompt
+'b' Name.Other
+' ' Text
+'===' Operator
+' ' Text
+'a' Name.Other
+'\n' Text
+
+'false' Keyword.Constant
+'\n' Text
+
+'> ' Generic.Prompt
+'if' Keyword
+'(' Punctuation
+'a' Name.Other
+')' Punctuation
+' ' Text
+'{' Punctuation
+'\n' Text
+
+'...' Generic.Prompt
+' ' Text
+'console' Name.Other
+'.' Punctuation
+'log' Name.Other
+'(' Punctuation
+'a' Name.Other
+')' Punctuation
+'\n' Text
+
+'...' Generic.Prompt
+' ' Text
+'}' Punctuation
+'\n' Text
+
+'3' Literal.Number.Float
+'\n' Text
+
+'undefined' Keyword.Constant
+'\n' Text
+
+'> ' Generic.Prompt
+'c' Name.Other
+'\n' Text
+
+'Uncaught' Name.Other
+' ' Text
+'ReferenceError' Name.Other
+':' Operator
+' ' Text
+'c' Name.Other
+' ' Text
+'is' Name.Other
+' ' Text
+'not' Name.Other
+' ' Text
+'defined' Name.Other
+'\n' Text