doc: add doc for test instruction
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
# WFassoc Core
|
||||
|
||||
## Usage
|
||||
|
||||
This crate provides low level API and high level API for manipulating Windows file associations at the same time.
|
||||
For the convenient use of this project, the root module of this crate re-expose high level API.
|
||||
So programmers can directly use them.
|
||||
@@ -10,3 +12,21 @@ Oppositely, for visiting low level API, please use `lowlevel` module.
|
||||
|
||||
If you are a programmer who want to take a deep into the internal implementations,
|
||||
see `win32` module and its submodules for detail.
|
||||
|
||||
## Test Notes
|
||||
|
||||
Some tests of this crate may be dangerous because they need to manipulate Windows Registry.
|
||||
So it is highlt recommend that run these tests in sandbox environment.
|
||||
In detailed words, you should run `cargo test --no-run` to build all test first,
|
||||
then fetch the path to executable tests according to this command shown on console.
|
||||
Then execute these executable tests in your sandbox for testing this crate.
|
||||
Additionally, some tests also need Administration permission for testing,
|
||||
because it requires write permission in HKLM.
|
||||
|
||||
If you do not test it with sandbox and administrative environment,
|
||||
test program will assert paniked and tell you how to resolve these issues.
|
||||
|
||||
The reason why do not run `cargo test` in sandbox environment directly,
|
||||
is that `cargo` can not find built tests located in host machine.
|
||||
It will try to fetch all dependencies again and rebuild test in sandbox entirely.
|
||||
So we use this complex way for testing.
|
||||
|
||||
Reference in New Issue
Block a user