changeset 35788:5455083f7e87

runtime(progress): Add syntax test for comments Commit: https://github.com/vim/vim/commit/408bd9ffe7e4d1f0891582edcbc4ab4c2a7df4bf Author: Daniel Smith <daniel@rdnlsmith.com> Date: Thu Jul 25 20:54:57 2024 +0200 runtime(progress): Add syntax test for comments We intend to update the Progress syntax file to support the single-line comment syntax that was introduced in Progress OpenEdge 11.6. As there are no existing tests for this file, we should first add one that demonstrates the comment syntax that is already supported. related: #15339 Signed-off-by: Daniel Smith <daniel@rdnlsmith.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Thu, 25 Jul 2024 21:00:13 +0200
parents cfefa86f2d59
children 0edb7f724b5c
files runtime/syntax/testdir/dumps/progress_comments_00.dump runtime/syntax/testdir/dumps/progress_comments_01.dump runtime/syntax/testdir/input/progress_comments.p
diffstat 3 files changed, 71 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
new file mode 100644
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/progress_comments_00.dump
@@ -0,0 +1,20 @@
+>/+0#0000e05#ffffff0|*| +0#0000000&@72
+| +0#0000e05&|*| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |s|e|t| |f|i|l|e|t|y|p|e|=|p|r|o|g|r|e|s@1| +0#0000000&@35
+| +0#0000e05&|*|/| +0#0000000&@71
+@75
+|d+0#af5f00255&|e|f|i|n|e| +0#0000000&|v+0#af5f00255&|a|r|i|a|b|l|e| +0#0000000&|c|u|s|t|o|m|e|r|_|n|a|m|e| |a+0#af5f00255&|s| +0#0000000&|c+0#af5f00255&|h|a|r|a|c|t|e|r| +0#0000000&|n+0#af5f00255&|o|-|u|n|d|o|.| +0#0000000&@23
+@75
+|/+0#0000e05&|*| |T|h|e| |t|e|s|t| |s|e|t|u|p| |a|b|o|v|e| |i|s| |a|n| |e|x|a|m|p|l|e| |o|f| |a| |m|u|l|t|i|-|l|i|n|e| |c|o|m@1|e|n|t|.| +0#0000000&@12
+|T+0#0000e05&|h|i|s| |i|s| |t|o@1|;| |t|h|e| |l|e|a|d|i|n|g| |*| |a|n|d| |l|e|f|t|-|h|a|n|d| |a|l|i|g|n|m|e|n|t| |a|r|e| |n|o|t| |r|e|q|u|i|r|e|d|.| |*|/| +0#0000000&@3
+|f+0#af5f00255&|o|r| +0#0000000&|e+0#af5f00255&|a|c|h| +0#0000000&|c|u|s|t|o|m|e|r| |n+0#af5f00255&|o|-|l|o|c|k| +0#0000000&@49
+@4|w+0#af5f00255&|h|e|r|e| +0#0000000&|c|u|s|t|o|m|e|r|.+0#af5f00255&|c+0#0000000&|u|s|t|o|m|e|r|_|i|d| |=+0#af5f00255&| +0#0000000&|1+0#e000002&|2|3|4|5| +0#0000000&@36
+|:+0#af5f00255&| +0#0000000&@73
+@4|a+0#af5f00255&|s@1|i|g|n| +0#0000000&|c|u|s|t|_|n|a|m|e| |=+0#af5f00255&| +0#0000000&|c|u|s|t|o|m|e|r|.+0#af5f00255&|c+0#0000000&|u|s|t|o|m|e|r|_|n|a|m|e|.+0#af5f00255&| +0#0000000&|/+0#0000e05&|*| |C|o|m@1|e|n|t|s| |c|a|n| |a|l|s|o| |a|p@1|e|a|r| +0#0000000&
+| +0#0000e05&@49|a|t| |t|h|e| |e|n|d| |o|f| |a| |l|i|n|e|.| |*|/| +0#0000000&
+|e+0#af5f00255&|n|d|.| +0#0000000&|/+0#0000e05&|*| |f|o|r| |e|a|c|h| |c|u|s|t|o|m|e|r| |*|/| +0#0000000&@46
+@75
+|/+0#0000e05&|*| |C|o|m@1|e|n|t|s| |c|a|n| |b|e| |/|*| |n|e|s|t|e|d| |*|/|.| |H|e|r|e|'|s| |t|h|e| |s|a|m|e| |q|u|e|r|y| |a|s| |a|b|o|v|e|,| |b|u|t| +0#0000000&@6
+|c+0#0000e05&|o|m@1|e|n|t|e|d| |o|u|t| |t|h|i|s| |t|i|m|e|:| +0#0000000&@50
+@75
+|f+0#0000e05&|o|r| |e|a|c|h| |c|u|s|t|o|m|e|r| |n|o|-|l|o|c|k| +0#0000000&@49
+@57|1|,|1| @10|T|o|p| 
new file mode 100644
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/progress_comments_01.dump
@@ -0,0 +1,20 @@
+|e+0#af5f00255#ffffff0|n|d|.| +0#0000000&|/+0#0000e05&|*| |f|o|r| |e|a|c|h| |c|u|s|t|o|m|e|r| |*|/| +0#0000000&@46
+@75
+|/+0#0000e05&|*| |C|o|m@1|e|n|t|s| |c|a|n| |b|e| |/|*| |n|e|s|t|e|d| |*|/|.| |H|e|r|e|'|s| |t|h|e| |s|a|m|e| |q|u|e|r|y| |a|s| |a|b|o|v|e|,| |b|u|t| +0#0000000&@6
+|c+0#0000e05&|o|m@1|e|n|t|e|d| |o|u|t| |t|h|i|s| |t|i|m|e|:| +0#0000000&@50
+@75
+>f+0#0000e05&|o|r| |e|a|c|h| |c|u|s|t|o|m|e|r| |n|o|-|l|o|c|k| +0#0000000&@49
+| +0#0000e05&@3|w|h|e|r|e| |c|u|s|t|o|m|e|r|.|c|u|s|t|o|m|e|r|_|i|d| |=| |1|2|3|4|5| +0#0000000&@36
+|:+0#0000e05&| +0#0000000&@73
+| +0#0000e05&@3|a|s@1|i|g|n| |c|u|s|t|_|n|a|m|e| |=| |c|u|s|t|o|m|e|r|.|c|u|s|t|o|m|e|r|_|n|a|m|e|.| |/|*| |C|o|m@1|e|n|t|s| |c|a|n| |a|l|s|o| |a|p@1|e|a|r| +0#0000000&
+| +0#0000e05&@49|a|t| |t|h|e| |e|n|d| |o|f| |a| |l|i|n|e|.| |*|/| +0#0000000&
+|e+0#0000e05&|n|d|.| |/|*| |f|o|r| |e|a|c|h| |c|u|s|t|o|m|e|r| |*|/| +0#0000000&@46
+@75
+|T+0#0000001#ffff4012|O|D|O|:+0#0000e05#ffffff0| |N|o|t|e| |t|h|a|t| |/|*|/| |d|o|e|s| |n|o|t| |e|n|d| |t|h|e| |c|o|m@1|e|n|t|,| |b|e|c|a|u|s|e| |i|t| |a|c|t|u|a|l@1|y| |s|t|a|r|t|s| |a| +0#0000000&
+|n+0#0000e05&|e|w| |c|o|m@1|e|n|t| |w|h|o|s|e| |f|i|r|s|t| |c|h|a|r|a|c|t|e|r| |i|s| |a| |'|/|'|.| |N|o|w| |w|e| |n|e@1|d| |t|w|o| |e|n|d|-|c|o|m@1|e|n|t| +0#0000000&@3
+|m+0#0000e05&|a|r|k|e|r|s| |t|o| |r|e|t|u|r|n| |t|o| |a|c|t|u|a|l| |c|o|d|e|.| |*|/| |*|/| +0#0000000&@35
+@75
+|d+0#af5f00255&|i|s|p|l|a|y| +0#0000000&|c|u|s|t|o|m|e|r|_|n|a|m|e|.+0#af5f00255&| +0#0000000&@52
+@75
+|~+0#4040ff13&| @73
+| +0#0000000&@56|1|9|,|1| @9|B|o|t| 
new file mode 100644
--- /dev/null
+++ b/runtime/syntax/testdir/input/progress_comments.p
@@ -0,0 +1,31 @@
+/*
+ * VIM_TEST_SETUP set filetype=progress
+ */
+
+define variable customer_name as character no-undo.
+
+/* The test setup above is an example of a multi-line comment.
+This is too; the leading * and left-hand alignment are not required. */
+for each customer no-lock
+    where customer.customer_id = 12345
+:
+    assign cust_name = customer.customer_name. /* Comments can also appear
+                                                  at the end of a line. */
+end. /* for each customer */
+
+/* Comments can be /* nested */. Here's the same query as above, but
+commented out this time:
+
+for each customer no-lock
+    where customer.customer_id = 12345
+:
+    assign cust_name = customer.customer_name. /* Comments can also appear
+                                                  at the end of a line. */
+end. /* for each customer */
+
+TODO: Note that /*/ does not end the comment, because it actually starts a
+new comment whose first character is a '/'. Now we need two end-comment
+markers to return to actual code. */ */
+
+display customer_name.
+