diff options
| author | Oleh Prypin <oleh@pryp.in> | 2021-01-20 10:48:45 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-20 10:48:45 +0100 |
| commit | 6f4309217326430145564ae8b1bb393ea684f39f (patch) | |
| tree | bf4025a5e709426dc927c4afc4fd2286f8450ed9 /tests/examplefiles/matlabsession | |
| parent | f0445be718da83541ea3401aad882f3937147263 (diff) | |
| download | pygments-git-6f4309217326430145564ae8b1bb393ea684f39f.tar.gz | |
Also add auto-updatable output-based tests to examplefiles (#1689)
Co-authored-by: Georg Brandl <georg@python.org>
Diffstat (limited to 'tests/examplefiles/matlabsession')
| -rw-r--r-- | tests/examplefiles/matlabsession/matlabsession_sample.txt | 37 | ||||
| -rw-r--r-- | tests/examplefiles/matlabsession/matlabsession_sample.txt.output | 115 |
2 files changed, 152 insertions, 0 deletions
diff --git a/tests/examplefiles/matlabsession/matlabsession_sample.txt b/tests/examplefiles/matlabsession/matlabsession_sample.txt new file mode 100644 index 00000000..1b33c9c4 --- /dev/null +++ b/tests/examplefiles/matlabsession/matlabsession_sample.txt @@ -0,0 +1,37 @@ +>> +>> +>> a = 'okay' + +a = + +okay + +>> x = rand(3) % a matrix + +x = + + 0.8147 0.9134 0.2785 + 0.9058 0.6324 0.5469 + 0.1270 0.0975 0.9575 + +>> 1/0 + +ans = + + Inf + +>> foo +??? Undefined function or variable 'foo'. + +>> +>> +>> {cos(2*pi), 'testing'} + +ans = + + [1] 'testing' + +>> +>> +>> + diff --git a/tests/examplefiles/matlabsession/matlabsession_sample.txt.output b/tests/examplefiles/matlabsession/matlabsession_sample.txt.output new file mode 100644 index 00000000..4f61bbb3 --- /dev/null +++ b/tests/examplefiles/matlabsession/matlabsession_sample.txt.output @@ -0,0 +1,115 @@ +'>>' Generic.Prompt +'\n' Text.Whitespace + +'>>' Generic.Prompt +'\n' Text.Whitespace + +'>> ' Generic.Prompt +'a' Name +' ' Text.Whitespace +'=' Punctuation +' ' Text.Whitespace +"'" Literal.String +"okay'" Literal.String +'\n' Text.Whitespace + +'\n' Generic.Output + +'a =\n' Generic.Output + +'\n' Generic.Output + +'okay\n' Generic.Output + +'\n' Generic.Output + +'>> ' Generic.Prompt +'x' Name +' ' Text.Whitespace +'=' Punctuation +' ' Text.Whitespace +'rand' Name +'(' Punctuation +'3' Literal.Number.Integer +')' Punctuation +' ' Text.Whitespace +'% a matrix' Comment +'\n' Text.Whitespace + +'\n' Generic.Output + +'x =\n' Generic.Output + +'\n' Generic.Output + +' 0.8147 0.9134 0.2785\n' Generic.Output + +' 0.9058 0.6324 0.5469\n' Generic.Output + +' 0.1270 0.0975 0.9575\n' Generic.Output + +'\n' Generic.Output + +'>> ' Generic.Prompt +'1' Literal.Number.Integer +'/' Operator +'0' Literal.Number.Integer +'\n' Text.Whitespace + +'\n' Generic.Output + +'ans =\n' Generic.Output + +'\n' Generic.Output + +' Inf\n' Generic.Output + +'\n' Generic.Output + +'>> ' Generic.Prompt +'foo' Name +'\n' Text.Whitespace + +"??? Undefined function or variable 'foo'.\n" Generic.Traceback + +'\n' Generic.Output + +'>>' Generic.Prompt +'\n' Text.Whitespace + +'>>' Generic.Prompt +'\n' Text.Whitespace + +'>> ' Generic.Prompt +'{' Punctuation +'cos' Name.Builtin +'(' Punctuation +'2' Literal.Number.Integer +'*' Operator +'pi' Name.Builtin +')' Punctuation +',' Punctuation +' ' Text.Whitespace +"'" Literal.String +"testing'" Literal.String +'}' Punctuation +'\n' Text.Whitespace + +'\n' Generic.Output + +'ans =\n' Generic.Output + +'\n' Generic.Output + +" [1] 'testing'\n" Generic.Output + +'\n' Generic.Output + +'>>' Generic.Prompt +'\n' Text.Whitespace + +'>>' Generic.Prompt +'\n' Text.Whitespace + +'>>' Generic.Prompt +'\n' Text.Whitespace |
