diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 11:33:32 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 11:33:32 +0000 |
commit | 1f403ad2197fc7442409f434ee574f3e6b46fb73 (patch) | |
tree | 0299c6dd11d5edfa918a29b6456bc1875f1d288c /tests/snippets/bibtex | |
parent | Initial commit. (diff) | |
download | pygments-1f403ad2197fc7442409f434ee574f3e6b46fb73.tar.xz pygments-1f403ad2197fc7442409f434ee574f3e6b46fb73.zip |
Adding upstream version 2.14.0+dfsg.upstream/2.14.0+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/snippets/bibtex')
-rw-r--r-- | tests/snippets/bibtex/test_basic_bst.txt | 54 | ||||
-rw-r--r-- | tests/snippets/bibtex/test_comment.txt | 7 | ||||
-rw-r--r-- | tests/snippets/bibtex/test_entry.txt | 63 | ||||
-rw-r--r-- | tests/snippets/bibtex/test_mismatched_brace.txt | 10 | ||||
-rw-r--r-- | tests/snippets/bibtex/test_missing_body.txt | 10 | ||||
-rw-r--r-- | tests/snippets/bibtex/test_preamble.txt | 11 | ||||
-rw-r--r-- | tests/snippets/bibtex/test_string.txt | 15 |
7 files changed, 170 insertions, 0 deletions
diff --git a/tests/snippets/bibtex/test_basic_bst.txt b/tests/snippets/bibtex/test_basic_bst.txt new file mode 100644 index 0000000..c519ae0 --- /dev/null +++ b/tests/snippets/bibtex/test_basic_bst.txt @@ -0,0 +1,54 @@ +---input--- +% BibTeX standard bibliography style `plain' + +INTEGERS { output.state before.all } + +FUNCTION {sort.format.title} +{ 't := +"A " #2 + "An " #3 + "The " #4 t chop.word + chop.word +chop.word +sortify +#1 global.max$ substring$ +} + +ITERATE {call.type$} + +---tokens--- +"% BibTeX standard bibliography style `plain'" Comment +'\n\n' Text.Whitespace + +'INTEGERS { output.state before.all }' Comment +'\n\n' Text.Whitespace + +'FUNCTION {sort.format.title}' Comment +'\n' Text.Whitespace + +"{ 't :=" Comment +'\n' Text.Whitespace + +'"A " #2' Comment +'\n ' Text.Whitespace +'"An " #3' Comment +'\n ' Text.Whitespace +'"The " #4 t chop.word' Comment +'\n ' Text.Whitespace +'chop.word' Comment +'\n' Text.Whitespace + +'chop.word' Comment +'\n' Text.Whitespace + +'sortify' Comment +'\n' Text.Whitespace + +'#1 global.max$ substring$' Comment +'\n' Text.Whitespace + +'}' Comment +'\n\n' Text.Whitespace + +'ITERATE {call.type$}' Comment +'\n' Text.Whitespace diff --git a/tests/snippets/bibtex/test_comment.txt b/tests/snippets/bibtex/test_comment.txt new file mode 100644 index 0000000..6e98d64 --- /dev/null +++ b/tests/snippets/bibtex/test_comment.txt @@ -0,0 +1,7 @@ +---input--- +@COMMENT{test} + +---tokens--- +'@COMMENT' Comment +'{test}' Comment +'\n' Text.Whitespace diff --git a/tests/snippets/bibtex/test_entry.txt b/tests/snippets/bibtex/test_entry.txt new file mode 100644 index 0000000..c712a2f --- /dev/null +++ b/tests/snippets/bibtex/test_entry.txt @@ -0,0 +1,63 @@ +---input--- +This is a comment. + +@ARTICLE{ruckenstein-diffusion, + author = "Liu, Hongquin" # and # "Ruckenstein, Eli", + year = 1997, + month = JAN, + pages = "888-895" +} + +---tokens--- +'This is a comment.' Comment +'\n\n' Text.Whitespace + +'@ARTICLE' Name.Class +'{' Punctuation +'ruckenstein-diffusion' Name.Label +',' Punctuation +'\n ' Text.Whitespace +'author' Name.Attribute +' ' Text.Whitespace +'=' Punctuation +' ' Text.Whitespace +'"' Literal.String +'Liu, Hongquin' Literal.String +'"' Literal.String +' ' Text.Whitespace +'#' Punctuation +' ' Text.Whitespace +'and' Name.Variable +' ' Text.Whitespace +'#' Punctuation +' ' Text.Whitespace +'"' Literal.String +'Ruckenstein, Eli' Literal.String +'"' Literal.String +',' Punctuation +'\n ' Text.Whitespace +'year' Name.Attribute +' ' Text.Whitespace +'=' Punctuation +' ' Text.Whitespace +'1997' Literal.Number +',' Punctuation +'\n ' Text.Whitespace +'month' Name.Attribute +' ' Text.Whitespace +'=' Punctuation +' ' Text.Whitespace +'JAN' Name.Variable +',' Punctuation +'\n ' Text.Whitespace +'pages' Name.Attribute +' ' Text.Whitespace +'=' Punctuation +' ' Text.Whitespace +'"' Literal.String +'888-895' Literal.String +'"' Literal.String +'\n' Text.Whitespace + +'}' Punctuation +'\n' Text.Whitespace diff --git a/tests/snippets/bibtex/test_mismatched_brace.txt b/tests/snippets/bibtex/test_mismatched_brace.txt new file mode 100644 index 0000000..6c1deda --- /dev/null +++ b/tests/snippets/bibtex/test_mismatched_brace.txt @@ -0,0 +1,10 @@ +---input--- +@PREAMBLE(""} + +---tokens--- +'@PREAMBLE' Name.Class +'(' Punctuation +'"' Literal.String +'"' Literal.String +'}' Error +'\n' Text.Whitespace diff --git a/tests/snippets/bibtex/test_missing_body.txt b/tests/snippets/bibtex/test_missing_body.txt new file mode 100644 index 0000000..24dad98 --- /dev/null +++ b/tests/snippets/bibtex/test_missing_body.txt @@ -0,0 +1,10 @@ +---input--- +@ARTICLE xxx + +---tokens--- +'@ARTICLE' Name.Class +' ' Text.Whitespace +'x' Error +'x' Error +'x' Error +'\n' Text.Whitespace diff --git a/tests/snippets/bibtex/test_preamble.txt b/tests/snippets/bibtex/test_preamble.txt new file mode 100644 index 0000000..9625f96 --- /dev/null +++ b/tests/snippets/bibtex/test_preamble.txt @@ -0,0 +1,11 @@ +---input--- +@PREAMBLE{"% some LaTeX code here"} + +---tokens--- +'@PREAMBLE' Name.Class +'{' Punctuation +'"' Literal.String +'% some LaTeX code here' Literal.String +'"' Literal.String +'}' Punctuation +'\n' Text.Whitespace diff --git a/tests/snippets/bibtex/test_string.txt b/tests/snippets/bibtex/test_string.txt new file mode 100644 index 0000000..f76a31b --- /dev/null +++ b/tests/snippets/bibtex/test_string.txt @@ -0,0 +1,15 @@ +---input--- +@STRING(SCI = "Science") + +---tokens--- +'@STRING' Name.Class +'(' Punctuation +'SCI' Name.Attribute +' ' Text.Whitespace +'=' Punctuation +' ' Text.Whitespace +'"' Literal.String +'Science' Literal.String +'"' Literal.String +')' Punctuation +'\n' Text.Whitespace |