runtime(progress): Add syntax test for comments Commit: https://github.com/vim/vim/commit/408bd9ffe7e4d1f0891582edcbc4ab4c2a7df4bf Author: Daniel Smith <dan...@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 <dan...@rdnlsmith.com> Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/runtime/syntax/testdir/dumps/progress_comments_00.dump b/runtime/syntax/testdir/dumps/progress_comments_00.dump new file mode 100644 index 000000000..d0cff21a5 --- /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| diff --git a/runtime/syntax/testdir/dumps/progress_comments_01.dump b/runtime/syntax/testdir/dumps/progress_comments_01.dump new file mode 100644 index 000000000..6ccebc200 --- /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| diff --git a/runtime/syntax/testdir/input/progress_comments.p b/runtime/syntax/testdir/input/progress_comments.p new file mode 100644 index 000000000..fc3f1cf88 --- /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. + -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/E1sX3hF-00AXVi-GN%40256bit.org.