Skip to content

Commit 0c60d96

Browse files
committed
Added failing test
1 parent 30cca98 commit 0c60d96

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

src/Dotnet.Script.Tests/Dotnet.Script.Tests.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>netcoreapp2.1;netcoreapp3.0</TargetFrameworks>
3+
<!-- <TargetFrameworks>netcoreapp2.1;netcoreapp3.0</TargetFrameworks> -->
4+
<TargetFrameworks>netcoreapp3.0</TargetFrameworks>
45
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
56
</PropertyGroup>
67
<ItemGroup>

src/Dotnet.Script.Tests/ScriptExecutionTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,13 @@ public void ShouldHandleLocalNuGetFileWhenPathContainsSpace()
446446
}
447447
}
448448

449+
[Fact]
450+
public void ShouldHandleScriptWithTargetFrameworkInShebang()
451+
{
452+
var result = ScriptTestRunner.Default.ExecuteFixture("TargetFrameworkInShebang");
453+
Assert.Contains("Hello world!", result.output);
454+
}
455+
449456

450457
private static string CreateTestScript(string scriptFolder)
451458
{
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!"netcoreapp2.0"
2+
Console.WriteLine("Hello world!");

0 commit comments

Comments
 (0)