File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
src/Dotnet.Script.Shared.Tests Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -307,5 +307,25 @@ public async Task ScriptPackageReferenceAsTheFirstLine()
307
307
var result = ctx . Console . Out . ToString ( ) ;
308
308
Assert . Contains ( "[Submission#0+SimpleTargets+TargetDictionary]" , result ) ;
309
309
}
310
+
311
+ [ Fact ]
312
+ public async Task ShouldCompileAndExecuteWithWebSdk ( )
313
+ {
314
+ var commands = new [ ]
315
+ {
316
+ @"#r ""sdk:Microsoft.NET.Sdk.Web""" ,
317
+ "using Microsoft.AspNetCore.Builder;" ,
318
+ "var a = WebApplication.Create();" ,
319
+ @"a.GetType()" ,
320
+ "#exit"
321
+ } ;
322
+
323
+ var ctx = GetRunner ( commands ) ;
324
+ await ctx . Runner . RunLoop ( ) ;
325
+
326
+ var result = ctx . Console . Out . ToString ( ) ;
327
+
328
+ Assert . Contains ( "[Microsoft.AspNetCore.Builder.WebApplication]" , result ) ;
329
+ }
310
330
}
311
331
}
You can’t perform that action at this time.
0 commit comments