Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@5368 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61pull/1/head
3 changed files with 46 additions and 1 deletions
@ -0,0 +1,39 @@ |
|||||||
|
// <file>
|
||||||
|
// <copyright see="prj:///doc/copyright.txt"/>
|
||||||
|
// <license see="prj:///doc/license.txt"/>
|
||||||
|
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
|
||||||
|
// <version>$Revision$</version>
|
||||||
|
// </file>
|
||||||
|
|
||||||
|
using System; |
||||||
|
using System.Collections.Generic; |
||||||
|
using ICSharpCode.RubyBinding; |
||||||
|
using ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor; |
||||||
|
using ICSharpCode.SharpDevelop.Dom; |
||||||
|
using ICSharpCode.TextEditor.Document; |
||||||
|
using NUnit.Framework; |
||||||
|
using RubyBinding.Tests; |
||||||
|
|
||||||
|
namespace RubyBinding.Tests.Parsing |
||||||
|
{ |
||||||
|
/// <summary>
|
||||||
|
/// A string of the form "require #" would cause a null reference exception since the ruby ast walker tries
|
||||||
|
/// to use the MethodCall's Argument which is null.
|
||||||
|
/// </summary>
|
||||||
|
[TestFixture] |
||||||
|
public class ParseRequireFollowedByCommentTestFixture |
||||||
|
{ |
||||||
|
[Test] |
||||||
|
public void ParseDoesNotThrowNullReferenceException() |
||||||
|
{ |
||||||
|
string ruby = "require #"; |
||||||
|
|
||||||
|
DefaultProjectContent projectContent = new DefaultProjectContent(); |
||||||
|
RubyParser parser = new RubyParser(); |
||||||
|
ICompilationUnit unit = null; |
||||||
|
|
||||||
|
Assert.DoesNotThrow(delegate { unit = parser.Parse(projectContent, @"C:\test.rb", ruby); }); |
||||||
|
Assert.IsNotNull(unit); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue