Skip to content

Commit 07573bd

Browse files
Tests and examples
1 parent 5e91e85 commit 07573bd

11 files changed

Lines changed: 896 additions & 17 deletions

File tree

src/Nap.VsCode/src/test/e2e/csx-scripts.e2e.test.ts

Lines changed: 581 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[meta]
2+
name = "CSX With Compilation Error"
3+
4+
[steps]
5+
../scripts/echo.csx
6+
../scripts/compile-error.csx
7+
./list-pets.nap
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[meta]
2+
name = "CSX With Failing Script"
3+
4+
[steps]
5+
../scripts/echo.csx
6+
../scripts/fail.csx
7+
./list-pets.nap
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[meta]
2+
name = "Multiple CSX Scripts"
3+
4+
[steps]
5+
../scripts/echo.csx
6+
./list-pets.nap
7+
../scripts/multi-output.csx
8+
./get-pet.nap
9+
../scripts/echo.csx
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[meta]
2+
name = "CSX-Only Playlist"
3+
4+
[steps]
5+
../scripts/echo.csx
6+
../scripts/multi-output.csx
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[meta]
2+
name = "CSX Slow Script"
3+
4+
[steps]
5+
../scripts/slow.csx
6+
./list-pets.nap
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// Script with intentional compilation error
2+
int x = "this is not an int";
3+
Console.WriteLine(x);
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// Script that deliberately fails with non-zero exit code
2+
Console.Error.WriteLine("[fail-csx] This script intentionally fails");
3+
Environment.Exit(1);
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Script that produces many lines of output
2+
for (var i = 1; i <= 50; i++)
3+
{
4+
Console.WriteLine($"[multi-output] Line {i} of 50");
5+
}
6+
Console.WriteLine("[multi-output] All lines written");
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// Script that takes a few seconds to complete
2+
Console.WriteLine("[slow-csx] Starting slow operation");
3+
await Task.Delay(3000);
4+
Console.WriteLine("[slow-csx] Slow operation complete");

0 commit comments

Comments
 (0)