Title: *-Item should handle files with wildcard characters · Issue #2799 · PowerShell/PowerShell · GitHub
Open Graph Title: *-Item should handle files with wildcard characters · Issue #2799 · PowerShell/PowerShell
X Title: *-Item should handle files with wildcard characters · Issue #2799 · PowerShell/PowerShell
Description: Steps to reproduce Describe "Rename-Item" { It "Rename-Item should work with files which have special characters" { $file = new-item -itemtype file "${TESTDRIVE}/file[txt].txt" test-path -literal $file.fullname | Should be $true Rename-I...
Open Graph Description: Steps to reproduce Describe "Rename-Item" { It "Rename-Item should work with files which have special characters" { $file = new-item -itemtype file "${TESTDRIVE}/file[txt].txt" test-path -literal $...
X Description: Steps to reproduce Describe "Rename-Item" { It "Rename-Item should work with files which have special characters" { $file = new-item -itemtype file "${TESTDRIVE}/file[txt]....
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/2799
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"*-Item should handle files with wildcard characters","articleBody":"\r\nSteps to reproduce\r\n------------------\r\n```powershell\r\nDescribe \"Rename-Item\" {\r\n It \"Rename-Item should work with files which have special characters\" {\r\n $file = new-item -itemtype file \"${TESTDRIVE}/file[txt].txt\"\r\n test-path -literal $file.fullname | Should be $true\r\n Rename-Item -literal $file.fullname \"${TESTDRIVE}/file.txt.txt\"\r\n test-path -literal $file.fullname | Should be $false\r\n test-path -literal \"${TESTDRIVE}/file.txt.txt\" | should be $true\r\n }\r\n}\r\n```\r\n\r\nExpected behavior\r\n-----------------\r\nthis test should pass (and it does on Windows)\r\n\r\n\r\nActual behavior\r\n---------------\r\nRename-Item can't seem to find the file\r\n```\r\nDescribing Rename-Item\r\n [-] Rename-Item should work with files which have special characters 1.41s\r\n An object at the specified path /tmp/bc945451-748f-471e-8dab-f2d09a1b2221/file[txt].txt does not exist.\r\n at line: 5 in /home/james/tmp/rename.item.tests.ps1\r\nTests completed in 1.41s\r\nPassed: 0 Failed: 1 Skipped: 0 Pending: 0\r\n```\r\n\r\nEnvironment data\r\n----------------\r\n\r\n\r\n```powershell\r\n> $PSVersionTable\r\nName Value\r\n---- -----\r\nPSVersion 6.0.0-alpha\r\nPSEdition Core\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}\r\nBuildVersion 3.0.0.0\r\nGitCommitId v6.0.0-alpha.13-10-g7015e66baecc02955640b5c19e7feb5cb6746c63\r\nCLRVersion\r\nWSManStackVersion 3.0\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\n```\r\n```\r\nuname -a\r\nLinux jimtru-ub16d 4.4.0-47-generic #68-Ubuntu SMP Wed Oct 26 19:39:52 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux\r\n```","author":{"url":"https://github.com/JamesWTruher","@type":"Person","name":"JamesWTruher"},"datePublished":"2016-11-29T01:03:22Z","url":"https://github.com/PowerShell/PowerShell/issues/2799"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ba018457-f70c-1567-3218-03161f1e4612 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C384:27478C:3525A9:4B3A9F:6AFD77D8 |
| html-safe-nonce | 7d4c437165206460aa3d3d0906c2af31cd63ffee205a191146d0b689bb9a858d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMzg0OjI3NDc4QzozNTI1QTk6NEIzQTlGOjZBRkQ3N0Q4IiwidmlzaXRvcl9pZCI6IjY0ODA5OTM3NDYwODYwOTg5MDQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 97e1f09d2aaa92c8ad2f34fdbdec14c37038adc343ed549307febe9c5768801f |
| hovercard-subject-tag | issue:192160600 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/2799/issue_layout |
| twitter:image | https://opengraph.githubassets.com/67aaaf05b6192533d323d6250053d5650c44c469161b776c3b309de2fae2ce50/PowerShell/PowerShell/issues/2799 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/67aaaf05b6192533d323d6250053d5650c44c469161b776c3b309de2fae2ce50/PowerShell/PowerShell/issues/2799 |
| og:image:alt | Steps to reproduce Describe "Rename-Item" { It "Rename-Item should work with files which have special characters" { $file = new-item -itemtype file "${TESTDRIVE}/file[txt].txt" test-path -literal $... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JamesWTruher |
| hostname | github.com |
| expected-hostname | github.com |
| None | 544ff6b59bd215c4609120f6e334dbd0b00d34fb6f8bc03a476f72256998887e |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 71c92f8b27ec5e9aa6f6477b4e067a4727fc9edb |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width