summaryrefslogtreecommitdiffstats
path: root/tests/snippets/praat
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 11:33:32 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 11:33:32 +0000
commit1f403ad2197fc7442409f434ee574f3e6b46fb73 (patch)
tree0299c6dd11d5edfa918a29b6456bc1875f1d288c /tests/snippets/praat
parentInitial commit. (diff)
downloadpygments-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/praat')
-rw-r--r--tests/snippets/praat/test_broken_unquoted_string.txt16
-rw-r--r--tests/snippets/praat/test_function_call.txt20
-rw-r--r--tests/snippets/praat/test_inline_if.txt27
-rw-r--r--tests/snippets/praat/test_interpolated_indexed_numeric_with_precision.txt6
-rw-r--r--tests/snippets/praat/test_interpolated_local_numeric_with_precision.txt6
-rw-r--r--tests/snippets/praat/test_interpolated_numeric_hash.txt6
-rw-r--r--tests/snippets/praat/test_interpolated_numeric_indexed.txt6
-rw-r--r--tests/snippets/praat/test_interpolated_numeric_with_precision.txt6
-rw-r--r--tests/snippets/praat/test_interpolated_string_hash.txt6
-rw-r--r--tests/snippets/praat/test_interpolated_string_indexed.txt6
-rw-r--r--tests/snippets/praat/test_interpolation_boundary.txt14
-rw-r--r--tests/snippets/praat/test_numeric_assignment.txt11
-rw-r--r--tests/snippets/praat/test_string_assignment.txt12
-rw-r--r--tests/snippets/praat/test_string_escaped_quotes.txt13
14 files changed, 155 insertions, 0 deletions
diff --git a/tests/snippets/praat/test_broken_unquoted_string.txt b/tests/snippets/praat/test_broken_unquoted_string.txt
new file mode 100644
index 0000000..e108bb8
--- /dev/null
+++ b/tests/snippets/praat/test_broken_unquoted_string.txt
@@ -0,0 +1,16 @@
+---input---
+printline string
+... 'interpolated' string
+
+---tokens---
+'printline' Keyword
+' ' Text.Whitespace
+'string' Literal.String
+'\n' Text.Whitespace
+
+'...' Punctuation
+' ' Text.Whitespace
+"'interpolated'" Literal.String.Interpol
+' ' Text.Whitespace
+'string' Literal.String
+'\n' Text.Whitespace
diff --git a/tests/snippets/praat/test_function_call.txt b/tests/snippets/praat/test_function_call.txt
new file mode 100644
index 0000000..608ef16
--- /dev/null
+++ b/tests/snippets/praat/test_function_call.txt
@@ -0,0 +1,20 @@
+---input---
+selected("Sound", i+(a*b))
+
+---tokens---
+'selected' Name.Function
+'(' Punctuation
+'"' Literal.String
+'Sound' Literal.String
+'"' Literal.String
+',' Punctuation
+' ' Text.Whitespace
+'i' Text
+'+' Operator
+'(' Text
+'a' Text
+'*' Operator
+'b' Text
+')' Punctuation
+')' Punctuation
+'\n' Text.Whitespace
diff --git a/tests/snippets/praat/test_inline_if.txt b/tests/snippets/praat/test_inline_if.txt
new file mode 100644
index 0000000..e370263
--- /dev/null
+++ b/tests/snippets/praat/test_inline_if.txt
@@ -0,0 +1,27 @@
+---input---
+var = if true == 1 then -1 else 0 fi
+
+---tokens---
+'var' Text
+' ' Text.Whitespace
+'=' Operator
+' ' Text.Whitespace
+'if' Keyword
+' ' Text.Whitespace
+'true' Text
+' ' Text.Whitespace
+'==' Operator
+' ' Text.Whitespace
+'1' Literal.Number
+' ' Text.Whitespace
+'then' Keyword
+' ' Text.Whitespace
+'-' Operator
+'1' Literal.Number
+' ' Text.Whitespace
+'else' Keyword
+' ' Text.Whitespace
+'0' Literal.Number
+' ' Text.Whitespace
+'fi' Keyword
+'\n' Text.Whitespace
diff --git a/tests/snippets/praat/test_interpolated_indexed_numeric_with_precision.txt b/tests/snippets/praat/test_interpolated_indexed_numeric_with_precision.txt
new file mode 100644
index 0000000..0dc23e6
--- /dev/null
+++ b/tests/snippets/praat/test_interpolated_indexed_numeric_with_precision.txt
@@ -0,0 +1,6 @@
+---input---
+'a[3]:3'
+
+---tokens---
+"'a[3]:3'" Literal.String.Interpol
+'\n' Text.Whitespace
diff --git a/tests/snippets/praat/test_interpolated_local_numeric_with_precision.txt b/tests/snippets/praat/test_interpolated_local_numeric_with_precision.txt
new file mode 100644
index 0000000..515fa9e
--- /dev/null
+++ b/tests/snippets/praat/test_interpolated_local_numeric_with_precision.txt
@@ -0,0 +1,6 @@
+---input---
+'a.a:3'
+
+---tokens---
+"'a.a:3'" Literal.String.Interpol
+'\n' Text.Whitespace
diff --git a/tests/snippets/praat/test_interpolated_numeric_hash.txt b/tests/snippets/praat/test_interpolated_numeric_hash.txt
new file mode 100644
index 0000000..3d6d0f8
--- /dev/null
+++ b/tests/snippets/praat/test_interpolated_numeric_hash.txt
@@ -0,0 +1,6 @@
+---input---
+'a["b"]'
+
+---tokens---
+'\'a["b"]\'' Literal.String.Interpol
+'\n' Text.Whitespace
diff --git a/tests/snippets/praat/test_interpolated_numeric_indexed.txt b/tests/snippets/praat/test_interpolated_numeric_indexed.txt
new file mode 100644
index 0000000..ea436f1
--- /dev/null
+++ b/tests/snippets/praat/test_interpolated_numeric_indexed.txt
@@ -0,0 +1,6 @@
+---input---
+'a[3]'
+
+---tokens---
+"'a[3]'" Literal.String.Interpol
+'\n' Text.Whitespace
diff --git a/tests/snippets/praat/test_interpolated_numeric_with_precision.txt b/tests/snippets/praat/test_interpolated_numeric_with_precision.txt
new file mode 100644
index 0000000..8ab410d
--- /dev/null
+++ b/tests/snippets/praat/test_interpolated_numeric_with_precision.txt
@@ -0,0 +1,6 @@
+---input---
+'a:3'
+
+---tokens---
+"'a:3'" Literal.String.Interpol
+'\n' Text.Whitespace
diff --git a/tests/snippets/praat/test_interpolated_string_hash.txt b/tests/snippets/praat/test_interpolated_string_hash.txt
new file mode 100644
index 0000000..49f5147
--- /dev/null
+++ b/tests/snippets/praat/test_interpolated_string_hash.txt
@@ -0,0 +1,6 @@
+---input---
+'a$["b"]'
+
+---tokens---
+'\'a$["b"]\'' Literal.String.Interpol
+'\n' Text.Whitespace
diff --git a/tests/snippets/praat/test_interpolated_string_indexed.txt b/tests/snippets/praat/test_interpolated_string_indexed.txt
new file mode 100644
index 0000000..7a845d7
--- /dev/null
+++ b/tests/snippets/praat/test_interpolated_string_indexed.txt
@@ -0,0 +1,6 @@
+---input---
+'a$[3]'
+
+---tokens---
+"'a$[3]'" Literal.String.Interpol
+'\n' Text.Whitespace
diff --git a/tests/snippets/praat/test_interpolation_boundary.txt b/tests/snippets/praat/test_interpolation_boundary.txt
new file mode 100644
index 0000000..1f3b14b
--- /dev/null
+++ b/tests/snippets/praat/test_interpolation_boundary.txt
@@ -0,0 +1,14 @@
+---input---
+"'" + "'"
+
+---tokens---
+'"' Literal.String
+"'" Literal.String
+'"' Literal.String
+' ' Text.Whitespace
+'+' Operator
+' ' Text.Whitespace
+'"' Literal.String
+"'" Literal.String
+'"' Literal.String
+'\n' Text.Whitespace
diff --git a/tests/snippets/praat/test_numeric_assignment.txt b/tests/snippets/praat/test_numeric_assignment.txt
new file mode 100644
index 0000000..55fc1e6
--- /dev/null
+++ b/tests/snippets/praat/test_numeric_assignment.txt
@@ -0,0 +1,11 @@
+---input---
+var = -15e4
+
+---tokens---
+'var' Text
+' ' Text.Whitespace
+'=' Operator
+' ' Text.Whitespace
+'-' Operator
+'15e4' Literal.Number
+'\n' Text.Whitespace
diff --git a/tests/snippets/praat/test_string_assignment.txt b/tests/snippets/praat/test_string_assignment.txt
new file mode 100644
index 0000000..baff23d
--- /dev/null
+++ b/tests/snippets/praat/test_string_assignment.txt
@@ -0,0 +1,12 @@
+---input---
+var$ = "foo"
+
+---tokens---
+'var$' Text
+' ' Text.Whitespace
+'=' Operator
+' ' Text.Whitespace
+'"' Literal.String
+'foo' Literal.String
+'"' Literal.String
+'\n' Text.Whitespace
diff --git a/tests/snippets/praat/test_string_escaped_quotes.txt b/tests/snippets/praat/test_string_escaped_quotes.txt
new file mode 100644
index 0000000..1cf6330
--- /dev/null
+++ b/tests/snippets/praat/test_string_escaped_quotes.txt
@@ -0,0 +1,13 @@
+---input---
+"it said ""foo"""
+
+---tokens---
+'"' Literal.String
+'it said ' Literal.String
+'"' Literal.String
+'"' Literal.String
+'foo' Literal.String
+'"' Literal.String
+'"' Literal.String
+'"' Literal.String
+'\n' Text.Whitespace