Skip to content

Add more tab completion tests - #4560

Merged
Aditya Patwardhan (adityapatwardhan) merged 4 commits into
PowerShell:masterfrom
daxian-dbw:tabcompletiontest
Aug 15, 2017
Merged

Aditya Patwardhan (adityapatwardhan) merged 4 commits into
PowerShell:masterfrom
daxian-dbw:tabcompletiontest

Conversation

@daxian-dbw

@daxian-dbw Dongbo Wang (daxian-dbw) commented Aug 11, 2017

Copy link
Copy Markdown
Member

The second round of adding tab completion tests - issue: #4160

30 tests are added to improve the test coverage in CompletionAnalysis.cs

CompletionAnalysis.cs

  • cursor position (you have some of these covered, not sure if all)
  • filename after redirection
  • line continuation
  • DSC resource
  • Cursor on special tokens, like comma and minus
  • using module <module-name/file-completion>
  • Enum property value of DSC Resource

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM with minor comment.


AfterAll {
Pop-Location
Remove-Item -Path $tempDir -Recurse -Force

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) Aug 11, 2017

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please add -ErrorAction SilentlyContinue

CommandLine = "Test history completion"
ExecutionStatus = "Stopped"
StartExecutionTime = "8/11/2017 11:04:10 AM"
EndExecutionTime = "8/11/2017 11:05:49 AM"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The dates is not explicitly used but it is culture dependent. Should our tests work under different cultures?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Dongbo Wang (@daxian-dbw) Can you address feedback from Ilya (@iSazonov)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good catch. Will change to use a DataTime object instead.

@iSazonov

Copy link
Copy Markdown
Collaborator

LGTM.

@adityapatwardhan
Aditya Patwardhan (adityapatwardhan) merged commit a648d4d into PowerShell:master Aug 15, 2017
@daxian-dbw
Dongbo Wang (daxian-dbw) deleted the tabcompletiontest branch August 15, 2017 23:37
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
* Add tab completion tests for CompletionAnalysis.cs

* Minor fixes

* Address comment

* Address one more comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants