Commit Graph

84 Commits

Author SHA1 Message Date
Richard Kuhnt 54ec3365f2 Don't set $env:TEMP on unix, instead use /tmp as workingdir for tests 2017-05-31 01:35:51 +02:00
Richard Kuhnt 8a746c8678 Ignore .DS_Store in tests 2017-05-31 01:02:48 +02:00
Richard Kuhnt 641dd70011 Fix unzip_old test 2017-05-31 00:50:15 +02:00
Richard Kuhnt f982068d4f Small path fixes to make manifest tests pass on unix 2017-05-30 22:12:50 +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
Richard Kuhnt 5b4b2fce99 Some path fixes for unix 2017-05-27 17:12:37 +02:00
Richard Kuhnt 59139bae04 Use remove-item/copy-item instead of rm/cp to resolve unix conflicts
Powershell aliases for rm/cp will not work, because the system commands are used
2017-05-27 17:12:12 +02:00
Richard Kuhnt 139813a8f5 Tests: handle JSON.NET schema validation limit exceeded.
Copied from extras bucket
2017-05-27 16:51:02 +02:00
Richard Kuhnt a9dfea5cf0 Fix manifest tests for pester v4 2017-05-27 16:26:58 +02:00
Richard Kuhnt 404f9be2f2 Fix repo_dir not being set correctly 2017-05-07 20:52:58 +02:00
Rémy 0a21edd0d5 add tests for some version edge cases 2017-04-03 19:41:52 +02:00
Rémy bf23c300ae add tests for shim_def 2017-04-03 19:12:21 +02:00
Rémy 822239335b add tests for is_in_dir 2017-04-03 19:06:49 +02:00
Rémy 303c1e43f2 add tests for various file name functions 2017-04-03 18:53:14 +02:00
Rémy a5b6d86134 add tests for ensure_architecture 2017-04-03 18:46:13 +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 807fcb0ebd fix tests 2017-03-30 00:42:19 +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
Rémy 9388c90232 remove travel_dir partial implementation 2017-03-25 16:28:05 +01:00
Luke Sampson 0aa2cd1532 Throw error if null file encountered while testing newlines (see #1377) 2017-03-17 08:26:31 +11:00
Richard Kuhnt 2e5bf31bde Add testing for valid hashs 2017-03-08 17:47:47 +01:00
Luke Sampson 24127669bd Handle dashed version components (fixes #1344) 2017-02-21 22:02:47 +11:00
Richard Kuhnt 1feda7a088 [WIP] Validate manifests against JSON Schema in CI Tests (#1331)
* Add suggest and psmodule to schema.json
* Fix required fields in schema.json
* Improve url validation in schema.json
* Add validator.exe as a single file validation tool
* Add Scoop.Validator Lib for use in Manifest-Tests
* Add buildscript for Scoop.Validator and validator.exe
* Exclude .dll and packages folder from Project-Tests
* Validate manifests against JSON Schema in CI Tests
* Complete JSON Schema Validation
* Dlls shouldn't be treated as text
2017-02-17 19:00:56 +01:00
Luke Sampson 1c173bc56d Use sentence case for UI messages. 2017-02-13 20:20:41 +11:00
Richard Kuhnt 11d2d07422 Improve manifest validation tests for url and extract_dir
Manifest validation should fail if there are untranslated variables left over in url or extract_dir
2017-02-03 00:36:18 +01:00
Luke Sampson 68b6e33d9e fix encoding 2016-04-19 14:42:49 +10: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 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