From fbdcfa8066f98d896c2a746aa4fc6d5869f7e8d2 Mon Sep 17 00:00:00 2001 From: Christopher Trudeau Date: Mon, 21 Jun 2021 16:25:58 -0400 Subject: Changes from code review: - renamed nodecon to nodejsrepl - removed bad mimetypes --- .../nodejsrepl/nodejsrepl_test.nodejsrepl | 20 ++++ .../nodejsrepl/nodejsrepl_test.nodejsrepl.output | 112 +++++++++++++++++++++ 2 files changed, 132 insertions(+) create mode 100644 tests/examplefiles/nodejsrepl/nodejsrepl_test.nodejsrepl create mode 100644 tests/examplefiles/nodejsrepl/nodejsrepl_test.nodejsrepl.output (limited to 'tests/examplefiles/nodejsrepl') diff --git a/tests/examplefiles/nodejsrepl/nodejsrepl_test.nodejsrepl b/tests/examplefiles/nodejsrepl/nodejsrepl_test.nodejsrepl new file mode 100644 index 00000000..7679d9ce --- /dev/null +++ b/tests/examplefiles/nodejsrepl/nodejsrepl_test.nodejsrepl @@ -0,0 +1,20 @@ +// Node.js REPL 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/nodejsrepl/nodejsrepl_test.nodejsrepl.output b/tests/examplefiles/nodejsrepl/nodejsrepl_test.nodejsrepl.output new file mode 100644 index 00000000..28c5c3a5 --- /dev/null +++ b/tests/examplefiles/nodejsrepl/nodejsrepl_test.nodejsrepl.output @@ -0,0 +1,112 @@ +'' Text +'// Node.js REPL 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 -- cgit v1.2.1