Commit Graph
53 Commits
Author SHA1 Message Date
Roy Ivy III b8c6787272 improve project "style contraints" testing
* more minor refactoring
2015-12-19 14:38:37 -06:00
Roy Ivy III 8f9695b411 improve project "style contraints" testing
* includes code refactoring/improvements and improved test descriptions
2015-12-19 11:17:57 -06:00
Simon Hartcher b9e5238546 Merge pull request #477 from rivy/fix-tests-core-Win10
fix Scoop-Core tests for Win10 (#hack)
2015-09-01 20:46:02 +10:00
Roy Ivy III bfb94972ae Merge branch 'upstream' into dev-whitespace
Conflicts:
	test/00-Project.Tests.ps1
2015-08-31 17:29:33 -07:00
Roy Ivy III 80ddbc49cb update test comments and add attribution 2015-08-28 17:42:17 -05:00
Roy Ivy III 490594ca27 add simple syntax checking for all PowerShell script/module files
* checks all .ps1 and .psm1 files in the Project repository
* NOTE: this is just simple syntax checking, but it can catch a lot of simple mistakes
2015-08-28 17:33:14 -05:00
Roy Ivy III 2453136312 fix Scoop-Core tests for Win10 (#hack)
* fixes tests by coercing the `test-unzip` return value back into a valid path string
* fixes #476

.# Discussion

For Win10 machines, `test-unzip` returns a bugged value, causing test failures.

Investigation shows that the combination of Pester, COM (used within unzip_old), and
Win10 leads to the odd/bugged return value. The return value contains the correct
string, but it is prefaced with a leading space which arises de-novo during the
execution return process from `test-unzip`. The value is correct and usable at the end
of `test-unzip` but is bugged upon receiving the value at the caller. Removing the COM
call from within `unzip_old` or using a Windows version earlier than Win10 fixes the
problem, but are obviously not useful as solutions.

Given the nature of the returned value and COM involvement, the real problem is likely
stack corruption. But it's not clear whether the issue is with Pester, Win10/PowerShell,
or possibly even some subtle bug within unzip_old.

This, admittedly hacky, coercion fixes the problem for all Windows versions and also
keeps Appveyor satisfied.
2015-08-26 18:02:31 -05:00
Roy Ivy III 617843ccab Merge branch 'upstream' into dev-whitespace
Conflicts:
	test/Scoop-Alias.Tests.ps1
2015-08-26 09:22:48 -05:00
Roy Ivy III 03b611757e comment cleanup 2015-08-26 09:19:00 -05:00
Roy Ivy III 5200dc280e fix/improve Scoop-Alias and Scoop-Core tests
* Scoop-Alias: remove erroneous output from dot-sourcing the source file
* Scoop-Alias: using "TestDrive:\" for mocked shimdir
  - reduced cleanup
  - improved robustness; excution is now independent of CWD
* Scoop-Core: corrected directory location code
  - improved robustness; execution is now independent of CWD
2015-08-25 22:45:21 -05:00
Roy Ivy III 6545f2e438 add tests to maintain whitespace style constraints
.# Discussion

These tests help to maintain five style constraints:

1. files have no utf-8 byte-order-marks (BOM)
2. all files have CRLF EOLNs (*required* for correct operation of BAT/CMD script files)
3. all files end with a newline
4. any leading whitespace consists solely of spaces
5. no trailing whitespace

By using these constraints, whitespace noise between commits is reduced to a minimum.
2015-08-25 22:07:13 -05:00
Roy Ivy III 32b26ccae9 whitespace cleanup (for .\test\fixtures)
* change files to be in accordance with .editorconfig
* files in this commit are separate from the initial whitespace commit to check for testing code breakage
* NOTE: whitespace changes *only* (`git diff -b` shows no changes)
2015-08-19 12:02:27 -05:00
Roy Ivy III 6d9bca805f whitespace cleanup
* makes changes to almost all main repo files to be in accordance with .editorconfig
* some files in "test\fixtures\..." were left alone to avoid breaking tests
* NOTE: whitespace changes *only* (`git diff -b` shows no changes)
2015-08-17 22:54:43 -05:00
Simon Hartcher 371c15ea77 Add test for sanitary_path 2015-07-24 14:10:01 +10:00
Simon Hartcher bf4e92588c Sanitise path when returning manifest path
Fixes #386
2015-07-24 14:04:38 +10:00
Simon Hartcher 8a0e8b8bc0 Fix error when passing regex keywords to getopt #386 2015-07-24 13:38:27 +10:00
Simon Hartcher 3578a65454 Merge pull request #380 from lukesampson/scoop-alias
Add scoop-alias command
2015-06-01 10:31:01 +10:00
Simon Hartcher 9e7bb98399 Add scoop-alias command
Fixes #377
2015-05-31 16:47:30 +10:00
Simon Hartcher 69d6175bbe Mock versiondir when running robocopy test 2015-05-31 14:43:24 +10:00
Simon Hartcher 1a2db05366 Fix #376 Robocopy is not always in PATH
Add ensure_robocopy_in_path method to core.ps1 which checks if
robocopy is available, then shims it if not.
2015-05-30 17:53:41 +10:00
Simon Hartcher 24347c2afb Revert "Add ability to reset scoop (also adds Git Bash support)" 2015-05-10 12:05:11 +10:00
Simon Hartcher c85475c8d6 Add tests for scoop reset scoop command 2015-05-09 22:52:49 +10:00
Simon Hartcher 23a39252aa Fix shim tests failing when shimdir is not in path 2015-04-12 22:44:57 +10:00
Simon Hartcher 49bd9b637d Add tests for shim
Refactored rm_shims into two functions rm_shims and rm_shim
Added tests for shim and rm_shim
Added test for quote in username (#196)
2015-04-12 21:15:50 +10:00
Simon Hartcher 44969bee9d Add test for invalid json file
The test currently expects invalid json to throw. This might not
be the desired outcome.
2015-04-12 15:28:28 +10:00
Simon Hartcher 006c2b0bae Add manifest validation tests
The manifest-validation test iterates through each json in the main
bucket to ensure that required fields (url, version) are not empty
2015-04-12 13:26:27 +10:00
Simon Hartcher e8ed3fc2e3 Change setup_working to use %TEMP% 2015-04-12 12:12:14 +10:00
Simon Hartcher 2fa644c6df Remove old tests and fixtures 2015-04-12 12:12:13 +10:00
Simon Hartcher 3a2adf9c3d Migrate old tests to Pester
Migrate unzip_old tests to pester
Migrate packages tests to Pester
Migrate opts.ps1 to Pester
Migrate tests to use Pester idiomatic tests
Move tests.ps1 to Scoop-TestLib.ps1
2015-04-12 12:11:03 +10:00
Simon Hartcher 47544c9e77 Add Pester tests for Config and Versions
Add Scoop-Config.Tests
Add Scoop-Versions.Tests
Remove old tests
2015-04-12 12:10:06 +10:00
Simon Hartcher fb074f2c63 Remove unneeded scripts
Old movedir test
invoke-build script
2015-04-12 12:09:18 +10:00
Simon Hartcher 558e6eced1 Implement testing using Pester
Integrate with AppVeyor
2015-04-12 12:08:08 +10:00
Simon Hartcher bed692a608 Added movedir test for quotes in username (#196) 2015-04-07 13:44:00 +10:00
guillermooo 405723f91d fix #325 - bypass execution policy in vim's :shell command' 2015-04-06 21:32:47 +02:00
Luke Sampson 083cdd9743 handle version change from string to numeric (fixes #322) 2015-04-05 14:54:25 +10:00
Luke Sampson 2a3427bdd7 fix for install where username contains spaces (see #128) 2014-07-16 10:56:37 +10:00
Luke Sampson 26195a626d experimenting with possible solution for #126 where packages aren't accessible after updating an app 2014-07-15 13:44:44 +10:00
Luke Sampson b70a107d45 handle int/string mismatch when comparing versions 2014-06-23 09:27:43 +10:00
Luke Sampson a0674d1703 manual test for proxies 2014-05-12 12:43:40 +10:00
Luke Sampson 69c11d449a Revert "updated for new color naming in concfg (see lukesampson/concfg#3"
This reverts commit d4ff02bbef.
2014-03-17 18:08:33 +10:00
Luke Sampson d4ff02bbef updated for new color naming in concfg (see lukesampson/concfg#3 2014-03-17 15:58:49 +10:00
Luke Sampson a1ad14c224 tests for unzip with .NET pre-4.5 2014-03-16 10:02:44 +10:00
Luke Sampson 32dc679ec9 add MSI extraction, deprecate MSI install (see issues #16, #18) 2013-12-23 11:20:54 +10:00
Luke Sampson a21a2d2f1f word-wrap for notes, add note to sudo 2013-10-17 12:20:39 +10:00
Luke Sampson 97240400e0 rename opts to getopt, add comments 2013-09-06 14:20:46 +10:00
Luke Sampson e9b437dc13 remove redundant brackets 2013-09-03 11:05:01 +10:00
Luke Sampson b7cfd6fdb0 getopt: return remaining args, use getopt for scoop install 2013-09-03 10:45:47 +10:00
Luke Sampson fd7514fee3 improve test 'framework', more tests for getopt 2013-09-03 10:32:31 +10:00
Luke Sampson b28eca4efd add more tests for getopts 2013-09-02 23:45:54 +10:00
Luke Sampson dea0d9f409 more messing around with testing 2013-09-02 23:04:52 +10:00