mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Mark -NoTypeInformation as obsolete no-op and evaluate -IncludeTypeInformation on by value on Csv cmdlets (#26719)
This commit is contained in:
@@ -101,11 +101,6 @@ Describe "ConvertTo-Csv" -Tags "CI" {
|
||||
Should -Throw -ErrorId "CannotSpecifyQuoteFieldsAndUseQuotes,Microsoft.PowerShell.Commands.ConvertToCsvCommand"
|
||||
}
|
||||
|
||||
It "Does not support -IncludeTypeInformation and -NoTypeInformation at the same time" {
|
||||
{ $testObject | ConvertTo-Csv -IncludeTypeInformation -NoTypeInformation } |
|
||||
Should -Throw -ErrorId "CannotSpecifyIncludeTypeInformationAndNoTypeInformation,Microsoft.PowerShell.Commands.ConvertToCsvCommand"
|
||||
}
|
||||
|
||||
Context "QuoteFields parameter" {
|
||||
It "QuoteFields" {
|
||||
# Use 'FiRstCoLumn' to test case insensitivity
|
||||
|
||||
@@ -91,11 +91,6 @@ Describe "Export-Csv" -Tags "CI" {
|
||||
$results[0] | Should -BeExactly "#TYPE System.String"
|
||||
}
|
||||
|
||||
It "Does not support -IncludeTypeInformation and -NoTypeInformation at the same time" {
|
||||
{ $testObject | Export-Csv -Path $testCsv -IncludeTypeInformation -NoTypeInformation } |
|
||||
Should -Throw -ErrorId "CannotSpecifyIncludeTypeInformationAndNoTypeInformation,Microsoft.PowerShell.Commands.ExportCsvCommand"
|
||||
}
|
||||
|
||||
It "Should support -LiteralPath parameter" {
|
||||
$testObject | Export-Csv -LiteralPath $testCsv
|
||||
$results = Import-Csv -Path $testCsv
|
||||
|
||||
Reference in New Issue
Block a user