Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Krüger <mkrueger@xamarin.com>2014-01-23 15:45:20 +0400
committerMike Krüger <mkrueger@xamarin.com>2014-01-23 15:45:43 +0400
commit51500037fa62f96c4457474e510dbb2d6e568c31 (patch)
tree2f77b77dd0bb2fa5a618a54fcd853af471670d38 /main/tests
parent3a6f613fba63ef97b392c972e575d46a25be1bda (diff)
[Ide] Fixed log view double click jumping on windows.
Diffstat (limited to 'main/tests')
-rw-r--r--main/tests/UnitTests/MonoDevelop.Ide.Gui/LogViewTests.cs66
-rw-r--r--main/tests/UnitTests/UnitTests.csproj1
2 files changed, 67 insertions, 0 deletions
diff --git a/main/tests/UnitTests/MonoDevelop.Ide.Gui/LogViewTests.cs b/main/tests/UnitTests/MonoDevelop.Ide.Gui/LogViewTests.cs
new file mode 100644
index 0000000000..f835a72cb8
--- /dev/null
+++ b/main/tests/UnitTests/MonoDevelop.Ide.Gui/LogViewTests.cs
@@ -0,0 +1,66 @@
+//
+// LogViewTests.cs
+//
+// Author:
+// Mike Krüger <mkrueger@xamarin.com>
+//
+// Copyright (c) 2014 Xamarin Inc. (http://xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+using System;
+using System.Text;
+using NUnit.Framework;
+using MonoDevelop.Ide.Gui;
+using MonoDevelop.Projects;
+using MonoDevelop.Core;
+using MonoDevelop.Ide.CodeCompletion;
+using MonoDevelop.Ide.Gui.Content;
+using MonoDevelop.Ide.Gui.Components;
+
+
+namespace MonoDevelop.Ide.Gui
+{
+ [TestFixture]
+ public class LogViewTests
+ {
+ [Test]
+ public void TestUnixLineExtraction ()
+ {
+ string text = " at MonoDevelop.Ide.Gui.LogViewTests.TestUnixLineExtraction() in /Users/user/monodevelop/main/tests/UnitTests/MonoDevelop.Ide.Gui/LogViewTests.cs:line 45";
+ string file;
+ int line;
+ Assert.IsTrue (LogView.LogTextView.TryExtractFileAndLine (text, out file, out line));
+ Assert.AreEqual (file, "/Users/user/monodevelop/main/tests/UnitTests/MonoDevelop.Ide.Gui/LogViewTests.cs");
+ Assert.AreEqual (line, 45);
+ }
+
+ [Test]
+ public void TestWindowsLineExtraction ()
+ {
+ string text = "bei MonoDevelop.Ide.IdeApp.Run() in c:\\Users\\user\\Documents\\GitHub\\monodevelop\\main\\src\\core\\MonoDevelop.Ide\\MonoDevelop.Ide\\Ide.cs:Zeile 385.";
+ string file;
+ int line;
+ Assert.IsTrue (LogView.LogTextView.TryExtractFileAndLine (text, out file, out line));
+ Assert.AreEqual (file, "c:\\Users\\user\\Documents\\GitHub\\monodevelop\\main\\src\\core\\MonoDevelop.Ide\\MonoDevelop.Ide\\Ide.cs");
+ Assert.AreEqual (line, 385);
+ }
+
+ }
+}
+
diff --git a/main/tests/UnitTests/UnitTests.csproj b/main/tests/UnitTests/UnitTests.csproj
index f5180eea72..693cfae5a2 100644
--- a/main/tests/UnitTests/UnitTests.csproj
+++ b/main/tests/UnitTests/UnitTests.csproj
@@ -286,6 +286,7 @@
<Compile Include="MonoDevelop.Refactoring\SimpleAnalysisJobTests.cs" />
<Compile Include="MonoDevelop.Refactoring\ProjectGroupingProviderTests.cs" />
<Compile Include="MonoDevelop.Refactoring\FileGroupingProviderTests.cs" />
+ <Compile Include="MonoDevelop.Ide.Gui\LogViewTests.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\md.targets" />