Skip to content
Merged
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ try

$EICAR_STRING_B64 = "awZ8EmMWc3JjaAdvY2lrBgcbY20aBHBwGgROF3Z6cHJhHmBncn13cmF3HnJ9Z3plemFmYB5ndmBnHnV6f3YSF3sYexk= "
$bytes = [System.Convert]::FromBase64String($EICAR_STRING_B64)
$EICAR_STRING = -join ($bytes | ForeEach-Object { [char]($_ -bxor 0x33) })
Copy link
Collaborator

@vexx32 vexx32 Dec 29, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue isn't the use of alias or not; the issue is that the cmdlet name was misspelled (ForeEach-Object should be ForEach-Object). I think removing the alias was the right move; we should keep the proper full cmdlet name.

Why did this not come up in the initial PR?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I'll try cmdlet name. In initial PR we did not run all tests with [Feature].

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like we should be able to detect that the change is within a Feature test and automatically run those, let me think about this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CoreFX team uses a bot to run tests. We could do the same.
Perhaps it makes sense to run short set of tests initially for speed. Then always run full set of tests before merge.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iSazonov that's a good idea. Maintainers can request bot to run full set of tests after review is approved and CI tests pass. Let me work on this.

$EICAR_STRING = -join ($bytes | ForEach-Object { [char]($_ -bxor 0x33) })
{ Invoke-Expression -Command "echo '$EICAR_STRING'" } |
Should -Throw -ErrorId "ScriptContainedMaliciousContent,Microsoft.PowerShell.Commands.InvokeExpressionCommand"
}
Expand Down