forked from lucasmeijer/jamconverter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
JamRunnerTests.cs
46 lines (36 loc) · 992 Bytes
/
JamRunnerTests.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using System;
using NUnit.Framework;
namespace jamconverter.Tests
{
[TestFixture]
class JamRunnerTests
{
[Test]
public void CanRunJamProgram()
{
var program =
@"
local a = harry sally ;
Echo $(a)$(a) ;
";
var jamRunner = new JamRunner();
var output = jamRunner.Run(new [] { new SourceFileDescription() { Contents = program, FileName = "Jamfile.jam"}});
CollectionAssert.AreEqual(new[] {"harryharry harrysally sallyharry sallysally "}, output);
}
[Test]
// [Ignore("PlayGround")]
public void PlayGround()
{
var program =
@"
hallo = vier vijf ;
b = ja dus ;
Echo $(hallo)john$(b) ;
";
var jamRunner = new JamRunner();
var output = jamRunner.Run(new[] { new SourceFileDescription() { Contents = program, FileName = "Jamfile.jam" } });
foreach (var line in output)
Console.WriteLine(line);
}
}
}