{"action":"created","comment":{"url":"https://api.github.com/repos/PowerShell/PowerShell/pulls/comments/78608660","id":78608660,"diff_hunk":"@@ -0,0 +1,96 @@\n+Describe \"Start-Transcript, Stop-Transcript tests\" -tags \"CI\" {\n+    \n+    BeforeAll {\n+\n+        function ValidateTranscription {\n+            param\n+            (\n+                [string] $scriptToExecute,\n+                [string] $outputFilePath,\n+                [switch] $Append,\n+                [switch] $NoClobber,\n+                [string] $expectedError\n+            )\n+            \n+            if($Append -or $NoClobber)\n+            {\n+                #Add sample text to the file\n+                $content = \"This is sample test!\"\n+                $content | Out-File -FilePath $outputFilePath\n+                Test-Path $outputFilePath | Should be $true\n+            }\n+            #execute script\n+            $ps = [powershell]::Create()\n+            $ps.addscript($scriptToExecute).Invoke()\n+            $ps.commands.clear()\n+\n+            if($expectedError)\n+            {\n+                $ps.hadErrors | Should be $true\n+                $ps.Streams.Error.FullyQualifiedErrorId | Should be $expectedError\n+            }\n+            else \n+            {\n+                $ps.addscript(\"Get-Date\").Invoke()\n+                $ps.commands.clear()\n+                $ps.addscript(\"Stop-Transcript\").Invoke()\n+\n+                Test-Path $outputFilePath | Should be $true\n+                $outputFilePath | should contain \"Get-Date\"\n+                if($Append)\n+                {\n+                    $outputFilePath | Should contain $content\n+                }\n+            }\n+        }\n+        ## function ends here\n+\n+        $transcriptFilePath = join-path $TestDrive \"transcriptdata.txt\"         \n+    }\n+    \n+\n+    BeforeEach {\n+        Remove-Item $transcriptFilePath -ErrorAction SilentlyContinue\n+    }\n+\n+    It \"Should create Transcript file at default path\" {\n+        $script = \"Start-Transcript\"\n+        if ($isWindows)\n+        {\n+            $defaultTranscriptFilePath = [io.path]::Combine($env:USERPROFILE, \"Documents\", \"Powershell_transcript*\")\n+        }\n+        else \n+        {\n+            $defaultTranscriptFilePath = [io.path]::Combine($env:HOME, \"Powershell_transcript*\")\n+        }\n+        Remove-Item $defaultTranscriptFilePath -ErrorAction SilentlyContinue\n+        ValidateTranscription -scriptToExecute $script -outputFilePath $defaultTranscriptFilePath\n+    }\n+    It \"Should create Transcript file with 'Path' parameter\" {\n+        $script = \"Start-Transcript -path $transcriptFilePath\"\n+        ValidateTranscription -scriptToExecute $script -outputFilePath $transcriptFilePath -usePathParam \n+    }\n+    It \"Should create Transcript file with 'LiteralPath' parameter\" {\n+        $script = \"Start-Transcript -LiteralPath $transcriptFilePath\"\n+        ValidateTranscription -scriptToExecute $script -outputFilePath $transcriptFilePath -useLiteralPathParam","path":"test/powershell/Modules/Microsoft.Powershell.Host/Start-Transcript.Tests.ps1","position":75,"original_position":75,"commit_id":"487c2cb0c17a450df57d3c3694b2a9dc3503c496","original_commit_id":"487c2cb0c17a450df57d3c3694b2a9dc3503c496","user":{"login":"daxian-dbw","id":127450,"avatar_url":"https://avatars.githubusercontent.com/u/127450?v=3","gravatar_id":"","url":"https://api.github.com/users/daxian-dbw","html_url":"https://github.com/daxian-dbw","followers_url":"https://api.github.com/users/daxian-dbw/followers","following_url":"https://api.github.com/users/daxian-dbw/following{/other_user}","gists_url":"https://api.github.com/users/daxian-dbw/gists{/gist_id}","starred_url":"https://api.github.com/users/daxian-dbw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daxian-dbw/subscriptions","organizations_url":"https://api.github.com/users/daxian-dbw/orgs","repos_url":"https://api.github.com/users/daxian-dbw/repos","events_url":"https://api.github.com/users/daxian-dbw/events{/privacy}","received_events_url":"https://api.github.com/users/daxian-dbw/received_events","type":"User","site_admin":false},"body":"parameter `useLiteralPathParam` doesn't exist.","created_at":"2016-09-13T17:42:37Z","updated_at":"2016-09-13T17:42:37Z","html_url":"https://github.com/PowerShell/PowerShell/pull/2157#discussion_r78608660","pull_request_url":"https://api.github.com/repos/PowerShell/PowerShell/pulls/2157","_links":{"self":{"href":"https://api.github.com/repos/PowerShell/PowerShell/pulls/comments/78608660"},"html":{"href":"https://github.com/PowerShell/PowerShell/pull/2157#discussion_r78608660"},"pull_request":{"href":"https://api.github.com/repos/PowerShell/PowerShell/pulls/2157"}}},"pull_request":{"url":"https://api.github.com/repos/PowerShell/PowerShell/pulls/2157","id":83692057,"html_url":"https://github.com/PowerShell/PowerShell/pull/2157","diff_url":"https://github.com/PowerShell/PowerShell/pull/2157.diff","patch_url":"https://github.com/PowerShell/PowerShell/pull/2157.patch","issue_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/2157","number":2157,"state":"open","locked":false,"title":"Start-Transcript should validate if the path is a file (#1749)","user":{"login":"charub","id":18017330,"avatar_url":"https://avatars.githubusercontent.com/u/18017330?v=3","gravatar_id":"","url":"https://api.github.com/users/charub","html_url":"https://github.com/charub","followers_url":"https://api.github.com/users/charub/followers","following_url":"https://api.github.com/users/charub/following{/other_user}","gists_url":"https://api.github.com/users/charub/gists{/gist_id}","starred_url":"https://api.github.com/users/charub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charub/subscriptions","organizations_url":"https://api.github.com/users/charub/orgs","repos_url":"https://api.github.com/users/charub/repos","events_url":"https://api.github.com/users/charub/events{/privacy}","received_events_url":"https://api.github.com/users/charub/received_events","type":"User","site_admin":false},"body":"Resolve #1749","created_at":"2016-09-01T19:27:37Z","updated_at":"2016-09-13T17:42:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8bea61724321371b1b947340de8ab9cb9877728c","assignee":{"login":"daxian-dbw","id":127450,"avatar_url":"https://avatars.githubusercontent.com/u/127450?v=3","gravatar_id":"","url":"https://api.github.com/users/daxian-dbw","html_url":"https://github.com/daxian-dbw","followers_url":"https://api.github.com/users/daxian-dbw/followers","following_url":"https://api.github.com/users/daxian-dbw/following{/other_user}","gists_url":"https://api.github.com/users/daxian-dbw/gists{/gist_id}","starred_url":"https://api.github.com/users/daxian-dbw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daxian-dbw/subscriptions","organizations_url":"https://api.github.com/users/daxian-dbw/orgs","repos_url":"https://api.github.com/users/daxian-dbw/repos","events_url":"https://api.github.com/users/daxian-dbw/events{/privacy}","received_events_url":"https://api.github.com/users/daxian-dbw/received_events","type":"User","site_admin":false},"assignees":[{"login":"daxian-dbw","id":127450,"avatar_url":"https://avatars.githubusercontent.com/u/127450?v=3","gravatar_id":"","url":"https://api.github.com/users/daxian-dbw","html_url":"https://github.com/daxian-dbw","followers_url":"https://api.github.com/users/daxian-dbw/followers","following_url":"https://api.github.com/users/daxian-dbw/following{/other_user}","gists_url":"https://api.github.com/users/daxian-dbw/gists{/gist_id}","starred_url":"https://api.github.com/users/daxian-dbw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daxian-dbw/subscriptions","organizations_url":"https://api.github.com/users/daxian-dbw/orgs","repos_url":"https://api.github.com/users/daxian-dbw/repos","events_url":"https://api.github.com/users/daxian-dbw/events{/privacy}","received_events_url":"https://api.github.com/users/daxian-dbw/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/PowerShell/PowerShell/pulls/2157/commits","review_comments_url":"https://api.github.com/repos/PowerShell/PowerShell/pulls/2157/comments","review_comment_url":"https://api.github.com/repos/PowerShell/PowerShell/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/2157/comments","statuses_url":"https://api.github.com/repos/PowerShell/PowerShell/statuses/487c2cb0c17a450df57d3c3694b2a9dc3503c496","head":{"label":"charub:1749","ref":"1749","sha":"487c2cb0c17a450df57d3c3694b2a9dc3503c496","user":{"login":"charub","id":18017330,"avatar_url":"https://avatars.githubusercontent.com/u/18017330?v=3","gravatar_id":"","url":"https://api.github.com/users/charub","html_url":"https://github.com/charub","followers_url":"https://api.github.com/users/charub/followers","following_url":"https://api.github.com/users/charub/following{/other_user}","gists_url":"https://api.github.com/users/charub/gists{/gist_id}","starred_url":"https://api.github.com/users/charub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charub/subscriptions","organizations_url":"https://api.github.com/users/charub/orgs","repos_url":"https://api.github.com/users/charub/repos","events_url":"https://api.github.com/users/charub/events{/privacy}","received_events_url":"https://api.github.com/users/charub/received_events","type":"User","site_admin":false},"repo":{"id":67151362,"name":"PowerShell","full_name":"charub/PowerShell","owner":{"login":"charub","id":18017330,"avatar_url":"https://avatars.githubusercontent.com/u/18017330?v=3","gravatar_id":"","url":"https://api.github.com/users/charub","html_url":"https://github.com/charub","followers_url":"https://api.github.com/users/charub/followers","following_url":"https://api.github.com/users/charub/following{/other_user}","gists_url":"https://api.github.com/users/charub/gists{/gist_id}","starred_url":"https://api.github.com/users/charub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charub/subscriptions","organizations_url":"https://api.github.com/users/charub/orgs","repos_url":"https://api.github.com/users/charub/repos","events_url":"https://api.github.com/users/charub/events{/privacy}","received_events_url":"https://api.github.com/users/charub/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/charub/PowerShell","description":"PowerShell for every system!","fork":true,"url":"https://api.github.com/repos/charub/PowerShell","forks_url":"https://api.github.com/repos/charub/PowerShell/forks","keys_url":"https://api.github.com/repos/charub/PowerShell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/charub/PowerShell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/charub/PowerShell/teams","hooks_url":"https://api.github.com/repos/charub/PowerShell/hooks","issue_events_url":"https://api.github.com/repos/charub/PowerShell/issues/events{/number}","events_url":"https://api.github.com/repos/charub/PowerShell/events","assignees_url":"https://api.github.com/repos/charub/PowerShell/assignees{/user}","branches_url":"https://api.github.com/repos/charub/PowerShell/branches{/branch}","tags_url":"https://api.github.com/repos/charub/PowerShell/tags","blobs_url":"https://api.github.com/repos/charub/PowerShell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/charub/PowerShell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/charub/PowerShell/git/refs{/sha}","trees_url":"https://api.github.com/repos/charub/PowerShell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/charub/PowerShell/statuses/{sha}","languages_url":"https://api.github.com/repos/charub/PowerShell/languages","stargazers_url":"https://api.github.com/repos/charub/PowerShell/stargazers","contributors_url":"https://api.github.com/repos/charub/PowerShell/contributors","subscribers_url":"https://api.github.com/repos/charub/PowerShell/subscribers","subscription_url":"https://api.github.com/repos/charub/PowerShell/subscription","commits_url":"https://api.github.com/repos/charub/PowerShell/commits{/sha}","git_commits_url":"https://api.github.com/repos/charub/PowerShell/git/commits{/sha}","comments_url":"https://api.github.com/repos/charub/PowerShell/comments{/number}","issue_comment_url":"https://api.github.com/repos/charub/PowerShell/issues/comments{/number}","contents_url":"https://api.github.com/repos/charub/PowerShell/contents/{+path}","compare_url":"https://api.github.com/repos/charub/PowerShell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/charub/PowerShell/merges","archive_url":"https://api.github.com/repos/charub/PowerShell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/charub/PowerShell/downloads","issues_url":"https://api.github.com/repos/charub/PowerShell/issues{/number}","pulls_url":"https://api.github.com/repos/charub/PowerShell/pulls{/number}","milestones_url":"https://api.github.com/repos/charub/PowerShell/milestones{/number}","notifications_url":"https://api.github.com/repos/charub/PowerShell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/charub/PowerShell/labels{/name}","releases_url":"https://api.github.com/repos/charub/PowerShell/releases{/id}","deployments_url":"https://api.github.com/repos/charub/PowerShell/deployments","created_at":"2016-09-01T17:16:14Z","updated_at":"2016-09-01T17:16:23Z","pushed_at":"2016-09-13T00:03:10Z","git_url":"git://github.com/charub/PowerShell.git","ssh_url":"git@github.com:charub/PowerShell.git","clone_url":"https://github.com/charub/PowerShell.git","svn_url":"https://github.com/charub/PowerShell","homepage":"https://microsoft.com/powershell","size":18555,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"PowerShell:master","ref":"master","sha":"e1bfe97d87c7e60cedcfb403f7e450047e8a4b96","user":{"login":"PowerShell","id":11524380,"avatar_url":"https://avatars.githubusercontent.com/u/11524380?v=3","gravatar_id":"","url":"https://api.github.com/users/PowerShell","html_url":"https://github.com/PowerShell","followers_url":"https://api.github.com/users/PowerShell/followers","following_url":"https://api.github.com/users/PowerShell/following{/other_user}","gists_url":"https://api.github.com/users/PowerShell/gists{/gist_id}","starred_url":"https://api.github.com/users/PowerShell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PowerShell/subscriptions","organizations_url":"https://api.github.com/users/PowerShell/orgs","repos_url":"https://api.github.com/users/PowerShell/repos","events_url":"https://api.github.com/users/PowerShell/events{/privacy}","received_events_url":"https://api.github.com/users/PowerShell/received_events","type":"Organization","site_admin":false},"repo":{"id":49609581,"name":"PowerShell","full_name":"PowerShell/PowerShell","owner":{"login":"PowerShell","id":11524380,"avatar_url":"https://avatars.githubusercontent.com/u/11524380?v=3","gravatar_id":"","url":"https://api.github.com/users/PowerShell","html_url":"https://github.com/PowerShell","followers_url":"https://api.github.com/users/PowerShell/followers","following_url":"https://api.github.com/users/PowerShell/following{/other_user}","gists_url":"https://api.github.com/users/PowerShell/gists{/gist_id}","starred_url":"https://api.github.com/users/PowerShell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PowerShell/subscriptions","organizations_url":"https://api.github.com/users/PowerShell/orgs","repos_url":"https://api.github.com/users/PowerShell/repos","events_url":"https://api.github.com/users/PowerShell/events{/privacy}","received_events_url":"https://api.github.com/users/PowerShell/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PowerShell/PowerShell","description":"PowerShell for every system!","fork":false,"url":"https://api.github.com/repos/PowerShell/PowerShell","forks_url":"https://api.github.com/repos/PowerShell/PowerShell/forks","keys_url":"https://api.github.com/repos/PowerShell/PowerShell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PowerShell/PowerShell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PowerShell/PowerShell/teams","hooks_url":"https://api.github.com/repos/PowerShell/PowerShell/hooks","issue_events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/events{/number}","events_url":"https://api.github.com/repos/PowerShell/PowerShell/events","assignees_url":"https://api.github.com/repos/PowerShell/PowerShell/assignees{/user}","branches_url":"https://api.github.com/repos/PowerShell/PowerShell/branches{/branch}","tags_url":"https://api.github.com/repos/PowerShell/PowerShell/tags","blobs_url":"https://api.github.com/repos/PowerShell/PowerShell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PowerShell/PowerShell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PowerShell/PowerShell/git/refs{/sha}","trees_url":"https://api.github.com/repos/PowerShell/PowerShell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PowerShell/PowerShell/statuses/{sha}","languages_url":"https://api.github.com/repos/PowerShell/PowerShell/languages","stargazers_url":"https://api.github.com/repos/PowerShell/PowerShell/stargazers","contributors_url":"https://api.github.com/repos/PowerShell/PowerShell/contributors","subscribers_url":"https://api.github.com/repos/PowerShell/PowerShell/subscribers","subscription_url":"https://api.github.com/repos/PowerShell/PowerShell/subscription","commits_url":"https://api.github.com/repos/PowerShell/PowerShell/commits{/sha}","git_commits_url":"https://api.github.com/repos/PowerShell/PowerShell/git/commits{/sha}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/comments{/number}","issue_comment_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/comments{/number}","contents_url":"https://api.github.com/repos/PowerShell/PowerShell/contents/{+path}","compare_url":"https://api.github.com/repos/PowerShell/PowerShell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PowerShell/PowerShell/merges","archive_url":"https://api.github.com/repos/PowerShell/PowerShell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PowerShell/PowerShell/downloads","issues_url":"https://api.github.com/repos/PowerShell/PowerShell/issues{/number}","pulls_url":"https://api.github.com/repos/PowerShell/PowerShell/pulls{/number}","milestones_url":"https://api.github.com/repos/PowerShell/PowerShell/milestones{/number}","notifications_url":"https://api.github.com/repos/PowerShell/PowerShell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/labels{/name}","releases_url":"https://api.github.com/repos/PowerShell/PowerShell/releases{/id}","deployments_url":"https://api.github.com/repos/PowerShell/PowerShell/deployments","created_at":"2016-01-13T23:41:35Z","updated_at":"2016-09-13T16:32:18Z","pushed_at":"2016-09-13T17:05:21Z","git_url":"git://github.com/PowerShell/PowerShell.git","ssh_url":"git@github.com:PowerShell/PowerShell.git","clone_url":"https://github.com/PowerShell/PowerShell.git","svn_url":"https://github.com/PowerShell/PowerShell","homepage":"https://microsoft.com/powershell","size":24574,"stargazers_count":5063,"watchers_count":5063,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":533,"mirror_url":null,"open_issues_count":422,"forks":533,"open_issues":422,"watchers":5063,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PowerShell/PowerShell/pulls/2157"},"html":{"href":"https://github.com/PowerShell/PowerShell/pull/2157"},"issue":{"href":"https://api.github.com/repos/PowerShell/PowerShell/issues/2157"},"comments":{"href":"https://api.github.com/repos/PowerShell/PowerShell/issues/2157/comments"},"review_comments":{"href":"https://api.github.com/repos/PowerShell/PowerShell/pulls/2157/comments"},"review_comment":{"href":"https://api.github.com/repos/PowerShell/PowerShell/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PowerShell/PowerShell/pulls/2157/commits"},"statuses":{"href":"https://api.github.com/repos/PowerShell/PowerShell/statuses/487c2cb0c17a450df57d3c3694b2a9dc3503c496"}}}}
{"actor":{"display_login":"daxian-dbw"}}