Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long lived: Add test for parameter passing to batch -> java application #2281

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add comments
martin-strecker-sonarsource committed Jun 18, 2024
commit 3e792c38f17ed1a4454e888fd3877eb93068eddc
14 changes: 7 additions & 7 deletions Tests/SonarScanner.MSBuild.Common.Test/ProcessRunnerTests.cs
Original file line number Diff line number Diff line change
@@ -362,15 +362,15 @@ REM The sonar-scanner.bat uses %* to pass the argument to javac.exe
[DataRow(@"quote""name", @"quote""name")]
[DataRow(@"quotes ""& ampersands", @"quotes ""& ampersands")]
[DataRow(@"""multiple """""" quotes "" ", @"""multiple """""" quotes "" ")]
[DataRow(@"trailing backslash \", @"trailing backslash """)]
[DataRow(@"trailing backslash \", @"trailing backslash """)] // https://github.com/SonarSource/sonar-scanner-msbuild/issues/1706
[DataRow(@"trailing backslash \""", @"trailing backslash \""")]
[DataRow(@"trailing\\backslash\\", @"trailing\\backslash\\")]
[DataRow(@"trailing \\backslash\\", @"trailing \\backslash\")]
[DataRow(@"trailing \""""\ backslash""\\""", @"trailing \""\", @"backslash""\""""")]
[DataRow(@"trailing\\backslash\\", @"trailing\\backslash\\")] // https://github.com/SonarSource/sonar-scanner-msbuild/issues/1706
[DataRow(@"trailing \\backslash\\", @"trailing \\backslash\")] // https://github.com/SonarSource/sonar-scanner-msbuild/issues/1706
[DataRow(@"trailing \""""\ backslash""\\""", @"trailing \""\", @"backslash""\""""")] // https://github.com/SonarSource/sonar-scanner-msbuild/issues/1706
[DataRow(@"all special chars: \ / : * ? "" < > | %", @"all special chars: \ / : * ? "" < > | %")]
[DataRow(@"injection "" > foo.txt", @"injection "" > foo.txt")]
[DataRow(@"injection "" & echo haha", @"injection "" & echo haha")]
[DataRow(@"double escaping \"" > foo.txt", @"double escaping \", @">", @"foo.txt")]
[DataRow(@"double escaping \"" > foo.txt", @"double escaping \", @">", @"foo.txt")] // https://github.com/SonarSource/sonar-scanner-msbuild/issues/1706
[DataRow(@"^", @"^")]
[DataRow(@"a^", @"a^")]
[DataRow(@"a^b^c", @"a^b^c")]
@@ -398,8 +398,8 @@ REM The sonar-scanner.bat uses %* to pass the argument to javac.exe
[DataRow(@"]", @"]")]
[DataRow(@"!", @"!")]
[DataRow(@".", @".")]
[DataRow(@"*", @"LogArgs.class", @"LogArgs.java", @"ProcRunner_ArgumentQuotingForwardedByBatchScriptToJava.bat")]
[DataRow(@"*.*", @"LogArgs.class", @"LogArgs.java", @"ProcRunner_ArgumentQuotingForwardedByBatchScriptToJava.bat")]
[DataRow(@"*", @"LogArgs.class", @"LogArgs.java", @"ProcRunner_ArgumentQuotingForwardedByBatchScriptToJava.bat")] // Expected behavior
[DataRow(@"*.*", @"LogArgs.class", @"LogArgs.java", @"ProcRunner_ArgumentQuotingForwardedByBatchScriptToJava.bat")] // Expected behavior
[DataRow(@"""C:\*.*""", @"""C:\*.*""")]
[DataRow(@"?", @"?")]
[DataRow(@"=", @"=")]