From 58102e97e16f9d89b2cedf789a3eb11d6c0a26fc Mon Sep 17 00:00:00 2001
From: SHaselbauer <sarah.haselbauer@akquinet.de>
Date: Wed, 23 Jan 2013 11:47:55 -0500
Subject: [PATCH] alternative variant to disable thread creation by the scheduledExecutor in test selenium test cases

---
 tests/com/gitblit/tests/StringUtilsTest.java |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/tests/com/gitblit/tests/StringUtilsTest.java b/tests/com/gitblit/tests/StringUtilsTest.java
index 91bfa67..bcf3a99 100644
--- a/tests/com/gitblit/tests/StringUtilsTest.java
+++ b/tests/com/gitblit/tests/StringUtilsTest.java
@@ -150,4 +150,11 @@
 		assertFalse(StringUtils.fuzzyMatch("123", "12345"));
 		assertFalse(StringUtils.fuzzyMatch("AbCdEfHIJ", "abc*hhh"));
 	}
+	
+	@Test
+	public void testGetRepositoryPath() throws Exception {
+		assertEquals("gitblit/gitblit.git", StringUtils.extractRepositoryPath("git://github.com/gitblit/gitblit.git", new String [] { ".*?://github.com/(.*)" }));
+		assertEquals("gitblit.git", StringUtils.extractRepositoryPath("git://github.com/gitblit/gitblit.git", new String [] { ".*?://github.com/[^/].*?/(.*)" }));
+		assertEquals("gitblit.git", StringUtils.extractRepositoryPath("git://github.com/gitblit/gitblit.git"));
+	}
 }

--
Gitblit v1.9.1