Commit Graph

20 Commits

Author SHA1 Message Date
Richard Kuhnt 641dd70011 Fix unzip_old test 2017-05-31 00:50:15 +02:00
Richard Kuhnt f737315e73 Merge pull request #1517 from lukesampson/unix-compatible
[WIP] Add Unix compatibility (for maintenance jobs and manifest testing)
2017-05-30 21:59:15 +02:00
Luke Sampson 887f041fc7 Extract to _tmp instead of _scoop_extract to conserve 10 more characters in path. 2017-05-29 17:59:09 +10:00
Richard Kuhnt 24fd3a3c7e Move unix compatible functions to unix.ps1
- Change helper functions to snake_case
2017-05-28 13:59:42 +02:00
Richard Kuhnt 4f4e5d18d7 Skip tests heavily relying on robocopy and windows paths 2017-05-27 17:18:14 +02:00
Rémy 0fff49f89e create test file for install / add test for env_add|rm_path 2017-04-03 18:40:06 +02:00
Rémy 357b33ddfe persist file support 2017-03-25 16:28:06 +01:00
Rémy c9f4ddf219 implement persist definition and tests 2017-03-25 16:28:05 +01:00
Simon Hartcher 3bcdce409b Support for scoop install <bucket>/<app>
- TODO: support install of same name apps from different buckets?
2016-01-24 22:35:43 +11: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 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
Simon Hartcher 371c15ea77 Add test for sanitary_path 2015-07-24 14:10:01 +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 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 e8ed3fc2e3 Change setup_working to use %TEMP% 2015-04-12 12:12:14 +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 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