Commit graph

70 commits

Author SHA1 Message Date
Steve Lee 76de340e79 corrected use of PSModulePath casing to be consistent with Windows PowerShell (#3255)
* corrected use of PSModulePath casing to be consistent with Windows PowerShell
addresses #3227

* addressing review feedback
make "PSModulePath" into const
fixed some test workarounds due to failures for external reasons that wasn't meant to be checked in

* addressing review feedback
make "PSModulePath" into const
fixed some test workarounds due to failures for external reasons that wasn't meant to be checked in
2017-03-15 12:04:28 -07:00
Dongbo Wang 8b8d20d56b Work around the hang issue that happens when running class basic parsing tests (#3191) 2017-02-23 13:05:09 -08:00
Ilya 409ab7443f Fix GetType() bad pattern and related issues in tests (#3134)
* Fix GetType() bad pattern and related issues in tests

$var.GetType() can raise an exception in tests so we should check $var
before make the call. A large part of the tests does not make this
check.
I start with searching ".GetType()" but discovered many related issues
in tests (reduntant and unneeded tests, "throw" bad pattens, bugs,
formattings (sorry!) and so on) - I had to fix them too.

* Fix after code review
* Second wave of migration GetType() -> BeOfType
Removed 'GetType().Name' patterns.
2017-02-15 16:40:51 -08:00
Ilya a16fead0a5 Fix error position reporting on classes (#3103)
Interactive hosts expect an `IncompleteParseException` to signal that more input is expected.

When detecting errors, the parser can report 2 positions:
* where the error should be reported
* where the error was detected

Typically these are the same, so most error reporting methods have a single parameter.
For missing braces, the pattern is supposed to be to report the error after the opening brace, but the error is typically detected at the end of the file.

There were a few places where we were not consistent in reporting such errors, this PR corrects those places.
2017-02-13 16:45:00 -08:00
Ilya 9b23e1e1fe Fix error handling in parsing 'using' statement (#3007) 2017-01-17 12:54:43 -08:00
Jason Shirk 02b5f357a2 Remove trailing whitespace (#3001) 2017-01-16 13:31:14 -08:00
Sergei Vorobev fab25c5d50 Remove -Force from Import-Module in tests 2017-01-12 14:25:07 -08:00
iSazonov 0e2c1c4d9f Fix typo and formating in class basic parser tests 2017-01-05 08:41:34 -08:00
Dongbo Wang c982f30d4e Fix powershell class to use the current EngineSessionState for execution. (#2837)
When a PS class is defined in a module and the module gets reloaded, the class would still use the SessionState from the old module for execution, and thus it doesn't reflect changes to the module state during the reload. This fix is to make sure we always use the current EngineSessionState for PS class execution.
2016-12-09 11:06:07 -08:00
iSazonov 4edde10fda Now Enum values definition have space-insensitive syntax (#2690)
Fix to support whitespace after the `=` and before the value expression.
2016-11-18 14:00:26 -08:00
Josh Soref 2badb244de spelling fixes: test 2016-08-25 17:49:32 +00:00
Dongbo Wang 9ab60d6621 Fix the test that fails in Travis CI build (#1792) 2016-08-12 18:36:16 -07:00
Dongbo Wang 753b202a75 Fix tests that were broken by the sxs module path change. Also fix some unreliable tests. 2016-08-11 21:45:20 -07:00
James Truher 1b9565ae89 add tags to describe blocks that didn't have any tags 2016-07-27 12:06:51 -07:00
James Truher a784149b36 all tests are now marked with proper tag
also, update build.psm1 to be more flexible
2016-07-27 12:06:51 -07:00
James Truher 9e225ccae2 changes tags for tests
Start using tags CI, Feature, Scenario
2016-07-27 12:06:51 -07:00
Andrew Schwartzmeyer 41173a3b65 Rename IsCore to IsCoreCLR 2016-07-26 11:54:08 -07:00
James Truher b680b48160 tests now run clean on Windows and Linux 2016-07-20 12:10:12 -07:00
PowerShell Team 2674564542 Language tests now run clean on Linux 2016-07-20 12:10:12 -07:00
PowerShell Team cb08681a55 Add new test files to Language directory 2016-07-20 12:10:12 -07:00