-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
23bf800
commit 22bb2ae
Showing
9 changed files
with
293 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
src/utils/util/resolver-pipeline/testing/1_selected/glob-rewrite.xspec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE x:description [ | ||
<!ENTITY filedir "file:/C:/Users/wap1/Documents/usnistgov/OSCAL/src/specifications/profile-resolution/profile-resolution-examples/catalogs" > | ||
]> | ||
<x:description xmlns="http://csrc.nist.gov/ns/oscal/1.0" | ||
xmlns:o="http://csrc.nist.gov/ns/oscal/1.0" | ||
xmlns:opr="http://csrc.nist.gov/ns/oscal/profile-resolution" | ||
xmlns:x="http://www.jenitennison.com/xslt/xspec" | ||
stylesheet="../../oscal-profile-resolve-select.xsl"> | ||
<x:scenario label="Simple string"> | ||
<x:call function="o:glob-as-regex"> | ||
<x:param>ac</x:param> | ||
</x:call> | ||
<x:expect label="Anchored, otherwise the same" select="'^ac$'"/> | ||
</x:scenario> | ||
<x:scenario label="More complex string"> | ||
<x:call function="o:glob-as-regex"> | ||
<x:param>ac-1(1)</x:param> | ||
</x:call> | ||
<x:expect label="Anchored and escaped" select="'^ac-1\(1\)$'"/> | ||
</x:scenario> | ||
<x:scenario label="More complex string, with ?"> | ||
<x:call function="o:glob-as-regex"> | ||
<x:param>ac-1(?)</x:param> | ||
</x:call> | ||
<x:expect label="Anchored and escaped with substitution" select="'^ac-1\(.\)$'"/> | ||
</x:scenario> | ||
<x:scenario label="This time with *"> | ||
<x:call function="o:glob-as-regex"> | ||
<x:param>ac-1(*)</x:param> | ||
</x:call> | ||
<x:expect label="Anchored and escaped with substitution" select="'^ac-1\(.*\)$'"/> | ||
</x:scenario> | ||
</x:description> |
135 changes: 135 additions & 0 deletions
135
src/utils/util/resolver-pipeline/testing/1_selected/select-rlink.xspec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE x:description [ | ||
<!ENTITY filedir "file:/C:/Users/wap1/Documents/usnistgov/OSCAL/src/specifications/profile-resolution/profile-resolution-examples/catalogs" > | ||
]> | ||
<x:description xmlns="http://csrc.nist.gov/ns/oscal/1.0" | ||
xmlns:opr="http://csrc.nist.gov/ns/oscal/profile-resolution" | ||
xmlns:x="http://www.jenitennison.com/xslt/xspec" | ||
stylesheet="../../oscal-profile-resolve-select.xsl"> | ||
<x:scenario label="Direct import by file href"> | ||
<x:context> | ||
<profile> | ||
<import href="&filedir;/xyz-tiny_catalog.xml"> | ||
<include-controls> | ||
<with-id>z3</with-id> | ||
</include-controls> | ||
</import> | ||
</profile> | ||
</x:context> | ||
<x:expect label="Control selected from catalog source"> | ||
<profile> | ||
<selection uuid="..." opr:src="..."> | ||
<metadata> | ||
<title>XYZ Tiny Catalog</title> | ||
<last-modified>2020-05-30T14:51:42.355-04:00</last-modified> | ||
<version>1.0</version> | ||
<oscal-version>1.0.0-rc2</oscal-version> | ||
</metadata> | ||
<group opr:id="..."> | ||
<title>Group X of XYZ</title> | ||
</group> | ||
<group opr:id="..."> | ||
<title>Group Y of XYZ</title> | ||
</group> | ||
<group opr:id="..."> | ||
<title>Group Z of XYZ</title> | ||
<control id="z3" opr:id="..."><title>Control Z3</title></control> | ||
</group> | ||
</selection> | ||
</profile> | ||
</x:expect> | ||
</x:scenario> | ||
<x:scenario label="Indirect import via resource/rlink"> | ||
<x:context> | ||
<profile> | ||
<import href="#6e57d296-39c1-4e83-8107-4dcc2ede751b"> | ||
<include-controls> | ||
<with-id>z3</with-id> | ||
</include-controls> | ||
</import> | ||
<back-matter> | ||
<resource uuid="6e57d296-39c1-4e83-8107-4dcc2ede751b"> | ||
<title>Tiny Catalog</title> | ||
<rlink href="&filedir;/xyz-tiny_catalog.xml"/> | ||
</resource> | ||
</back-matter> | ||
</profile> | ||
</x:context> | ||
<x:expect label="Control selected from remote resource"> | ||
<profile> | ||
<selection uuid="..." opr:src="..."> | ||
<metadata> | ||
<title>XYZ Tiny Catalog</title> | ||
<last-modified>2020-05-30T14:51:42.355-04:00</last-modified> | ||
<version>1.0</version> | ||
<oscal-version>1.0.0-rc2</oscal-version> | ||
</metadata> | ||
<group opr:id="..."> | ||
<title>Group X of XYZ</title> | ||
</group> | ||
<group opr:id="..."> | ||
<title>Group Y of XYZ</title> | ||
</group> | ||
<group opr:id="..."> | ||
<title>Group Z of XYZ</title> | ||
<control id="z3" opr:id="..."><title>Control Z3</title></control> | ||
</group> | ||
</selection> | ||
<back-matter> | ||
<resource uuid="6e57d296-39c1-4e83-8107-4dcc2ede751b"> | ||
<title>Tiny Catalog</title> | ||
<rlink href="..."/> | ||
</resource> | ||
</back-matter> | ||
</profile> | ||
</x:expect> | ||
</x:scenario> | ||
<x:scenario label="Indirect import via resource/rlink selecting XML"> | ||
<x:context> | ||
<profile> | ||
<import href="#6e57d296-39c1-4e83-8107-4dcc2ede751b"> | ||
<include-controls> | ||
<with-id>z3</with-id> | ||
</include-controls> | ||
</import> | ||
<back-matter> | ||
<resource uuid="6e57d296-39c1-4e83-8107-4dcc2ede751b"> | ||
<title>Tiny Catalog</title> | ||
<rlink href="&filedir;/xyz-tiny_catalog.xml"/> | ||
<rlink href="&filedir;/xyz-tiny_catalog.json"/> | ||
</resource> | ||
</back-matter> | ||
</profile> | ||
</x:context> | ||
<x:expect label="Select all controls, grouped"> | ||
<profile> | ||
<selection uuid="..." opr:src="..."> | ||
<metadata> | ||
<title>XYZ Tiny Catalog</title> | ||
<last-modified>2020-05-30T14:51:42.355-04:00</last-modified> | ||
<version>1.0</version> | ||
<oscal-version>1.0.0-rc2</oscal-version> | ||
</metadata> | ||
<group opr:id="..."> | ||
<title>Group X of XYZ</title> | ||
</group> | ||
<group opr:id="..."> | ||
<title>Group Y of XYZ</title> | ||
</group> | ||
<group opr:id="..."> | ||
<title>Group Z of XYZ</title> | ||
<control id="z3" opr:id="..."><title>Control Z3</title></control> | ||
</group> | ||
</selection> | ||
<back-matter> | ||
<resource uuid="6e57d296-39c1-4e83-8107-4dcc2ede751b"> | ||
<title>Tiny Catalog</title> | ||
<rlink href="..."/> | ||
<rlink href="..."/> | ||
</resource> | ||
</back-matter> | ||
</profile> | ||
</x:expect> | ||
</x:scenario> | ||
|
||
</x:description> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.