1b5975d6bSopenharmony_ciFrom a2b5b9e906256f43b0bac702424613ea0e7ddcb0 Mon Sep 17 00:00:00 2001 2b5975d6bSopenharmony_ciFrom: Aleksei Rybalkin <aleksei@rybalkin.org> 3b5975d6bSopenharmony_ciDate: Mon, 25 Jul 2022 16:57:06 +0200 4b5975d6bSopenharmony_ciSubject: [PATCH] gregex: add original test case for issue #2700 5b5975d6bSopenharmony_ci 6b5975d6bSopenharmony_ciConflict:NA 7b5975d6bSopenharmony_ciReference:https://gitlab.gnome.org/GNOME/glib/-/commit/a2b5b9e906256f43b0bac702424613ea0e7ddcb0 8b5975d6bSopenharmony_ci 9b5975d6bSopenharmony_ci--- 10b5975d6bSopenharmony_ci glib/tests/regex.c | 1 + 11b5975d6bSopenharmony_ci 1 file changed, 1 insertion(+) 12b5975d6bSopenharmony_ci 13b5975d6bSopenharmony_cidiff --git a/glib/tests/regex.c b/glib/tests/regex.c 14b5975d6bSopenharmony_ciindex 5839465fae..acb082b704 100644 15b5975d6bSopenharmony_ci--- a/glib/tests/regex.c 16b5975d6bSopenharmony_ci+++ b/glib/tests/regex.c 17b5975d6bSopenharmony_ci@@ -2495,6 +2495,7 @@ main (int argc, char *argv[]) 18b5975d6bSopenharmony_ci 19b5975d6bSopenharmony_ci /* see https://gitlab.gnome.org/GNOME/glib/-/issues/2700 */ 20b5975d6bSopenharmony_ci TEST_MATCH("(\n.+)+", G_REGEX_DEFAULT, 0, "\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n", -1, 0, 0, TRUE); 21b5975d6bSopenharmony_ci+ TEST_MATCH("\n([\\-\\.a-zA-Z]+[\\-\\.0-9]*) +connected ([^(\n ]*)[^\n]*((\n +[0-9]+x[0-9]+[^\n]+)+)", G_REGEX_DEFAULT, 0, "Screen 0: minimum 1 x 1, current 3840 x 1080, maximum 8192 x 8192\nVirtual1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 0mm x 0mm\n 1920x1080 60.00*+ 59.96 \n 3840x2400 59.97 \n 3840x2160 59.97 \n 2880x1800 59.95 \n 2560x1600 59.99 \n 2560x1440 59.95 \n 1920x1440 60.00 \n 1856x1392 60.00 \n 1792x1344 60.00 \n 1920x1200 59.88 \n 1600x1200 60.00 \n 1680x1050 59.95 \n 1400x1050 59.98 \n 1280x1024 60.02 \n 1440x900 59.89 \n 1280x960 60.00 \n 1360x768 60.02 \n 1280x800 59.81 \n 1152x864 75.00 \n 1280x768 59.87 \n 1280x720 59.86 \n 1024x768 60.00 \n 800x600 60.32 \n 640x480 59.94 \nVirtual2 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 0mm x 0mm\n 1920x1080 60.00*+ 59.96 \n 3840x2400 59.97 \n 3840x2160 59.97 \n 2880x1800 59.95 \n 2560x1600 59.99 \n 2560x1440 59.95 \n 1920x1440 60.00 \n 1856x1392 60.00 \n 1792x1344 60.00 \n 1920x1200 59.88 \n 1600x1200 60.00 \n 1680x1050 59.95 \n 1400x1050 59.98 \n 1280x1024 60.02 \n 1440x900 59.89 \n 1280x960 60.00 \n 1360x768 60.02 \n 1280x800 59.81 \n 1152x864 75.00 \n 1280x768 59.87 \n 1280x720 59.86 \n 1024x768 60.00 \n 800x600 60.32 \n 640x480 59.94 \nVirtual3 disconnected (normal left inverted right x axis y axis)\nVirtual4 disconnected (normal left inverted right x axis y axis)\nVirtual5 disconnected (normal left inverted right x axis y axis)\nVirtual6 disconnected (normal left inverted right x axis y axis)\nVirtual7 disconnected (normal left inverted right x axis y axis)\nVirtual8 disconnected (normal left inverted right x axis y axis)\n", -1, 0, 0, TRUE); 22b5975d6bSopenharmony_ci 23b5975d6bSopenharmony_ci /* TEST_MATCH_NEXT#(pattern, string, string_len, start_position, ...) */ 24b5975d6bSopenharmony_ci TEST_MATCH_NEXT0("a", "x", -1, 0); 25b5975d6bSopenharmony_ci-- 26b5975d6bSopenharmony_ciGitLab 27b5975d6bSopenharmony_ci 28