提交 42ca3121 编写于 作者: C Charles Stoner

Merge pull request #3262 from cston/RemoveTest

Remove test intended for stabilization branch only
......@@ -7185,35 +7185,6 @@ vbc : error BC2015: the file '{1}' is not a text file
CleanupAllGeneratedFiles(nonCompilerInputFile)
End Sub
''' <summary>
''' Script compilation should be internal only.
''' </summary>
<WorkItem(1979, "https://github.com/dotnet/roslyn/issues/1979")>
<Fact>
Public Sub ScriptCompilationInternalOnly()
Dim source = "System.Console.WriteLine()"
Dim dir = Temp.CreateDirectory()
Dim file = dir.CreateFile("b.vbx")
file.WriteAllText(source)
' Compiling script file with internal API should be supported.
Dim compilation = CreateCompilationWithMscorlib(
<compilation>
<file name="b.vbx"><%= source %></file>
</compilation>,
parseOptions:=New VisualBasicParseOptions(LanguageVersion.VisualBasic14, DocumentationMode.Parse, SourceCodeKind.Script, ImmutableArray(Of KeyValuePair(Of String, Object)).Empty),
options:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication))
compilation.VerifyDiagnostics()
' Compiling with command-line compiler, should not treat .vbx as script.
Dim cmd = New MockVisualBasicCompiler(Nothing, _baseDirectory, {"/nologo", "/preferreduilang:en", file.Path})
Dim output As StringWriter = New StringWriter()
cmd.Run(output, Nothing)
Assert.True(output.ToString().Contains("error BC30689: Statement cannot appear outside of a method body."))
CleanupAllGeneratedFiles(file.Path)
End Sub
<Fact, WorkItem(1093063, "DevDiv")>
Public Sub VerifyDiagnosticSeverityNotLocalized()
Dim source = <![CDATA[
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册