From e7e8bd8af341719b7cb902c7861ea198f5db43a6 Mon Sep 17 00:00:00 2001
From: Robbert Noordzij <robbert@xseeding.nl>
Date: Tue, 07 Oct 2014 06:14:27 -0400
Subject: [PATCH] Bug in the rawservlet in extracting the repository out of the path. The offset for finding the next slash should be the current slash + 1, not the last offset + the offset of the current slash.
---
src/test/java/com/gitblit/tests/JnaUtilsTest.java | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/src/test/java/com/gitblit/tests/JnaUtilsTest.java b/src/test/java/com/gitblit/tests/JnaUtilsTest.java
index 25d1ccf..c7d5be9 100644
--- a/src/test/java/com/gitblit/tests/JnaUtilsTest.java
+++ b/src/test/java/com/gitblit/tests/JnaUtilsTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011 gitblit.com.
+ * Copyright 2013 gitblit.com.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,13 +15,8 @@
*/
package com.gitblit.tests;
-import com.gitblit.utils.JGitUtils;
-import com.gitblit.utils.JnaUtils;
import java.io.File;
import java.io.IOException;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
import org.apache.commons.io.FileUtils;
import org.eclipse.jgit.lib.Repository;
@@ -30,11 +25,14 @@
import org.eclipse.jgit.util.FS;
import org.junit.Test;
+import com.gitblit.utils.JGitUtils;
+import com.gitblit.utils.JnaUtils;
+
/**
*
* @author Florian Zschocke
*/
-public class JnaUtilsTest {
+public class JnaUtilsTest extends GitblitUnitTest {
@Test
public void testGetgid() {
--
Gitblit v1.9.1