Add tests for win_stat module.
This commit is contained in:
parent
c218a125bb
commit
a13b2dd3b3
2 changed files with 8 additions and 3 deletions
|
@ -27,7 +27,8 @@ description:
|
||||||
options:
|
options:
|
||||||
path:
|
path:
|
||||||
description:
|
description:
|
||||||
- The full path of the file/object to get the facts of
|
- The full path of the file/object to get the facts of; both forward and
|
||||||
|
back slashes are accepted.
|
||||||
required: true
|
required: true
|
||||||
default: null
|
default: null
|
||||||
aliases: []
|
aliases: []
|
||||||
|
|
|
@ -19,16 +19,20 @@
|
||||||
|
|
||||||
$params = Parse-Args $args;
|
$params = Parse-Args $args;
|
||||||
|
|
||||||
$path = '';
|
$path = $FALSE;
|
||||||
If ($params.path.GetType)
|
If ($params.path.GetType)
|
||||||
{
|
{
|
||||||
$path = $params.path;
|
$path = $params.path;
|
||||||
}
|
}
|
||||||
|
If ($path -eq $FALSE)
|
||||||
|
{
|
||||||
|
Fail-Json (New-Object psobject) "missing required argument: path";
|
||||||
|
}
|
||||||
|
|
||||||
$get_md5 = $TRUE;
|
$get_md5 = $TRUE;
|
||||||
If ($params.get_md5.GetType)
|
If ($params.get_md5.GetType)
|
||||||
{
|
{
|
||||||
$get_md5 = $params.get_md5;
|
$get_md5 = $params.get_md5 | ConvertTo-Bool;
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = New-Object psobject @{
|
$result = New-Object psobject @{
|
||||||
|
|
Loading…
Reference in a new issue