diff options
author | Jake Petroules <jake.petroules@petroules.com> | 2013-05-09 17:14:56 -0400 |
---|---|---|
committer | Jake Petroules <jake.petroules@petroules.com> | 2015-04-30 03:36:34 +0000 |
commit | 8ce511b8ae46f81aaafc93c191308ff950f6fe02 (patch) | |
tree | a28037afbf13f7de07137be0fc2e1a8dc09e736f /tests/auto/blackbox/testdata/cli | |
parent | aee8631573f7a75772fd61646c87824410c45a0c (diff) |
Add support for building Common Language Infrastructure assemblies.
Currently includes support for C#, F#, and Visual Basic.
Task-number: QBS-227
Change-Id: I6c82ad2dda6e99b407e31683ccdb3e355b21b21f
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Diffstat (limited to 'tests/auto/blackbox/testdata/cli')
-rwxr-xr-x | tests/auto/blackbox/testdata/cli/HelloWorld.cs | 12 | ||||
-rwxr-xr-x | tests/auto/blackbox/testdata/cli/Libby.cs | 10 | ||||
-rwxr-xr-x | tests/auto/blackbox/testdata/cli/Libby2.cs | 10 | ||||
-rw-r--r-- | tests/auto/blackbox/testdata/cli/Module.cs | 10 | ||||
-rwxr-xr-x | tests/auto/blackbox/testdata/cli/Module.vb | 7 | ||||
-rwxr-xr-x | tests/auto/blackbox/testdata/cli/dotnettest.qbs | 51 | ||||
-rw-r--r-- | tests/auto/blackbox/testdata/cli/fshello.fs | 1 | ||||
-rw-r--r-- | tests/auto/blackbox/testdata/cli/fshello.qbs | 8 |
8 files changed, 109 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/cli/HelloWorld.cs b/tests/auto/blackbox/testdata/cli/HelloWorld.cs new file mode 100755 index 000000000..1b794c18c --- /dev/null +++ b/tests/auto/blackbox/testdata/cli/HelloWorld.cs @@ -0,0 +1,12 @@ +using Fake; + +public class HelloWorld +{ + public static void Main() + { + System.Console.WriteLine("Hello world!"); + System.Console.WriteLine(Mod.Cool()); + System.Console.WriteLine(Libby.Cool()); + System.Console.WriteLine(Libby2.Cool()); + } +} diff --git a/tests/auto/blackbox/testdata/cli/Libby.cs b/tests/auto/blackbox/testdata/cli/Libby.cs new file mode 100755 index 000000000..5ca27efd4 --- /dev/null +++ b/tests/auto/blackbox/testdata/cli/Libby.cs @@ -0,0 +1,10 @@ +namespace Fake +{ + public class Libby + { + public static int Cool() + { + return 45; + } + } +} diff --git a/tests/auto/blackbox/testdata/cli/Libby2.cs b/tests/auto/blackbox/testdata/cli/Libby2.cs new file mode 100755 index 000000000..cfaf99075 --- /dev/null +++ b/tests/auto/blackbox/testdata/cli/Libby2.cs @@ -0,0 +1,10 @@ +namespace Fake +{ + public class Libby2 + { + public static int Cool() + { + return 22; + } + } +} diff --git a/tests/auto/blackbox/testdata/cli/Module.cs b/tests/auto/blackbox/testdata/cli/Module.cs new file mode 100644 index 000000000..dc08846dc --- /dev/null +++ b/tests/auto/blackbox/testdata/cli/Module.cs @@ -0,0 +1,10 @@ +namespace Fake +{ + public class Mod + { + public static int Cool() + { + return 420; + } + } +} diff --git a/tests/auto/blackbox/testdata/cli/Module.vb b/tests/auto/blackbox/testdata/cli/Module.vb new file mode 100755 index 000000000..197636273 --- /dev/null +++ b/tests/auto/blackbox/testdata/cli/Module.vb @@ -0,0 +1,7 @@ +Namespace Fake + Public Class [Mod] + Public Shared Function Cool() As Integer + Return 420 + End Function + End Class +End Namespace diff --git a/tests/auto/blackbox/testdata/cli/dotnettest.qbs b/tests/auto/blackbox/testdata/cli/dotnettest.qbs new file mode 100755 index 000000000..c65a54c8c --- /dev/null +++ b/tests/auto/blackbox/testdata/cli/dotnettest.qbs @@ -0,0 +1,51 @@ +import qbs + +Project { + Application { + Depends { name: "cli" } + Depends { name: "HelloWorldModule"; condition: !qbs.toolchain.contains("mono") } + Depends { name: "NetLib" } + + type: "application" + name: "Hello" + files: ["HelloWorld.cs"] + + Group { + fileTagsFilter: product.type + qbs.install: true + } + } + + // Mono's VB compiler doesn't support modules yet, and if we try with C#, it crashes anyways + NetModule { + condition: !qbs.toolchain.contains("mono") + Depends { name: "cli" } + + name: "HelloWorldModule" + + files: ["Module.vb"] + + Group { + fileTagsFilter: product.type + qbs.install: true + } + } + + DynamicLibrary { + Depends { name: "cli" } + + name: "NetLib" + files: ["Libby.cs", "Libby2.cs"] + + // fill-in for missing NetModule + Group { + condition: qbs.toolchain.contains("mono") + files: ["Module.cs"] + } + + Group { + fileTagsFilter: product.type + qbs.install: true + } + } +} diff --git a/tests/auto/blackbox/testdata/cli/fshello.fs b/tests/auto/blackbox/testdata/cli/fshello.fs new file mode 100644 index 000000000..0df5ca57d --- /dev/null +++ b/tests/auto/blackbox/testdata/cli/fshello.fs @@ -0,0 +1 @@ +printfn "Hello World from F#!" diff --git a/tests/auto/blackbox/testdata/cli/fshello.qbs b/tests/auto/blackbox/testdata/cli/fshello.qbs new file mode 100644 index 000000000..44dbb5c4f --- /dev/null +++ b/tests/auto/blackbox/testdata/cli/fshello.qbs @@ -0,0 +1,8 @@ +import qbs + +Application { + Depends { name: "cli" } + type: "application" + name: "fshello" + files: "fshello.fs" +} |