[gnome-terminal] screen: Add unittest for very long regex match
- From: Egmont Koblinger <egmontkob src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal] screen: Add unittest for very long regex match
- Date: Sat, 20 Aug 2016 21:42:46 +0000 (UTC)
commit e022d08d1e266f7b44df5bcb5709a3947aa665ae
Author: Egmont Koblinger <egmont gmail com>
Date: Sat Aug 20 23:41:28 2016 +0200
screen: Add unittest for very long regex match
https://bugzilla.gnome.org/show_bug.cgi?id=770147#c8
src/terminal-regex.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/terminal-regex.c b/src/terminal-regex.c
index b9d1370..251f658 100644
--- a/src/terminal-regex.c
+++ b/src/terminal-regex.c
@@ -317,6 +317,19 @@ main (int argc, char **argv)
assert_match (REGEX_URL_VOIP, "SIP:alice;day=tuesday atlanta com", ENTIRE);
assert_match (REGEX_URL_VOIP, "Dial sip:alice@192.0.2.4.",
"sip:alice@192.0.2.4");
+ /* Extremely long match, bug 770147 */
+ assert_match (REGEX_URL_AS_IS, "http://www.example.com/ThisPathConsistsOfMoreThan1024Characters"
+
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
+
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
+
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
+
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
+
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
+
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
+
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
+
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
+
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
+
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890",
ENTIRE);
+
printf("terminal-regex tests passed :)\n");
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]