|
@@ -1,7 +1,9 @@
|
|
|
using FluentAssertions;
|
|
using FluentAssertions;
|
|
|
|
|
+using Larkdown.Parser.Ast;
|
|
|
using NUnit.Framework;
|
|
using NUnit.Framework;
|
|
|
using System;
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
using System.Collections.Generic;
|
|
|
|
|
+using System.IO;
|
|
|
using System.Text;
|
|
using System.Text;
|
|
|
|
|
|
|
|
namespace Larkdown.Parser.Tests.Integration
|
|
namespace Larkdown.Parser.Tests.Integration
|
|
@@ -33,5 +35,17 @@ namespace Larkdown.Parser.Tests.Integration
|
|
|
Assert.AreEqual(true, true);
|
|
Assert.AreEqual(true, true);
|
|
|
Assert.AreEqual(false, true);
|
|
Assert.AreEqual(false, true);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ [Test]
|
|
|
|
|
+ public void Parser__CanParse__Paragraphs()
|
|
|
|
|
+ {
|
|
|
|
|
+ var source = File.ReadAllText("Integration/Resources/paragraphs.lar");
|
|
|
|
|
+ var parser = new Parser();
|
|
|
|
|
+
|
|
|
|
|
+ var ast = parser.Parse(source);
|
|
|
|
|
+
|
|
|
|
|
+ ast.Nodes.Should().HaveCount(3);
|
|
|
|
|
+ ast.Nodes.Should().AllBeOfType<ParagraphNode>();
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|