From 93e78e533afb4d45753ad3e453757e0411022fd1 Mon Sep 17 00:00:00 2001 From: TingLiu6 Date: Fri, 20 May 2016 02:27:44 -0700 Subject: [PATCH] Added a V2 TC --- test/powershell/Export-Csv.Tests.ps1 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/powershell/Export-Csv.Tests.ps1 b/test/powershell/Export-Csv.Tests.ps1 index 3acbc931a1..f5009ff10a 100644 --- a/test/powershell/Export-Csv.Tests.ps1 +++ b/test/powershell/Export-Csv.Tests.ps1 @@ -99,4 +99,16 @@ Describe "Export-Csv DRT Unit Tests" -Tags DRT{ $property = $results | Get-Member | ? { $_.MemberType -eq "NoteProperty" } | % { $_.Name } $property | should not be P1 } + + It "Test export-csv with a useculture flag" { + $outputFilesDir = Join-Path $TestDrive -ChildPath "Monad" + $fileToGenerate = Join-Path $outputFilesDir -ChildPath "CSVTests.csv" + $delimiter = (Get-Culture).TextInfo.ListSeparator + New-Item -Path $outputFilesDir -ItemType Directory -Force + Get-Item -Path $outputFilesDir| Export-Csv -Path $fileToGenerate -UseCulture -NoTypeInformation + $contents = Get-Content -Path $fileToGenerate + $contents.Count | Should Be 2 + $contents[0].Contains($delimiter) | Should Be $true + $contents[1].Contains($delimiter) | Should Be $true + } }