User:Tampakrap/puppet
From Gentoo Wiki
Jump to:navigation
Jump to:search
puppet-portage
package_use
test case 1
Reproducer:
1)
package_use { "app-misc/dummy": use => "X", }
2) Run agent
Results:
- Create a file /etc/portage/package.use/default (PASSED)
- Content is app-misc/dummy X (PASSED)
test case 2
Reproducer:
1)
package_use { "app-misc/dummy": use => ["X", "-doc"], }
2) Run agent
3)
package_use { "app-misc/dummy": use => ["X", "-doc"], }
4) Run agent
Results:
- Create a file /etc/portage/package.use/dummy (PASSED)
- Content is app-misc/dummy X -doc (PASSED)
- Remove /etc/portage/package.use/default (FAILED)
test case 3
Reproducer:
1)
package_use { "app-misc/dummy": use => ["-X", "doc"], target => "dummy", }
2) Run agent
Results:
- Update the content of /etc/portage/package.use/dummy to -X doc (PASSED)
test case 4
Reproducer:
1)
package_use { "app-misc/dummy": use => "X doc", target => "dummy", }
2) Run agent
- Fail because of the whitespace (PASSED)
test case 5
Reproducer:
1)
package_use { "app-misc/dummy": use => ["X", "doc"], target => "dummy", } package_use { "sys-process/htop": use => "unicode", target => "dummy", }
2) Run agent
Results:
- Append to package.use/dummy the content sys-process/htop unicode (PASSED)
test case 6
Reproducer:
1)
package_use { "sys-process/htop": use => "unicode", target => "dummy", } package_use { "app-misc/dummy": use => ["X", "doc"], target => "dummy", }
2) Run agent
3)
package_use { "app-misc/dummy": use => ["X", "doc"], target => "dummy", }
4) Run agent
Results:
- package.use/dummy does not have htop entry (FAILED)
test case 7
Reproducer:
1)
package_use { "sys-process/htop": use => "unicode", target => "dummy", } package_use { "app-misc/dummy": use => ["X", "doc"], target => "dummy", }
2) Run agent
3)
package_use { "sys-process/htop": use => "unicode", target => "dummy", } package_use { "app-misc/dummy": use => ["X", "doc"], target => "dummy_new", }
4) Run agent
Results:
- Create package.use/dummy_new with content app-misc/dummy X doc (PASSED)
- Remove the app-misc/dummy entry from package.use/dummy (FAILED)
- package.use/dummy still has the sys-process/htop entry (PASSED)
test case 8
Reproducer:
1)
package_use { "app-misc/dummy": use => "doc", target => "dummy", version => "=3", }
2) Run agent
Results:
- (assuming X useflag is disabled globally)
- Create package.use/dummy with content =app-misc/dummy-3 X
- emerge =app-misc/dummy-3 has X enabled
- emerge =app-misc/dummy-3-r1 has X disabled
- emerge =app-misc/dummy-1 has X disabled
- emerge =app-misc/dummy-4 has X disabled
test case 9
Reproducer:
1)
package_use { "app-misc/dummy": use => "doc", target => "dummy", version => ">=3", }
2) Run agent
Results:
- (assuming X useflag is disabled globally)
- Create package.use/dummy with content >=app-misc/dummy-3 X
- emerge =app-misc/dummy-3 has X enabled
- emerge =app-misc/dummy-3-r1 has X enabled
- emerge =app-misc/dummy-1 has X disabled
- emerge =app-misc/dummy-4 has X enabled
test case 10
Reproducer:
1)
package_use { "app-misc/dummy": use => "doc", target => "dummy", version => "<=3", }
2) Run agent
Results:
- (assuming X useflag is disabled globally)
- Create package.use/dummy with content <=app-misc/dummy-3 X
- emerge =app-misc/dummy-3 has X enabled
- emerge =app-misc/dummy-3-r1 has X disabled
- emerge =app-misc/dummy-1 has X enabled
- emerge =app-misc/dummy-4 has X disabled
test case 11
Reproducer:
1)
package_use { "app-misc/dummy": use => "doc", target => "dummy", version => ">3", }
2) Run agent
Results:
- (assuming X useflag is disabled globally)
- Create package.use/dummy with content >app-misc/dummy-3 X
- emerge =app-misc/dummy-3 has X disabled
- emerge =app-misc/dummy-3-r1 has X enabled
- emerge =app-misc/dummy-1 has X disabled
- emerge =app-misc/dummy-4 has X enabled
test case 12
Reproducer:
1)
package_use { "app-misc/dummy": use => "doc", target => "dummy", version => "<3", }
2) Run agent
Results:
- (assuming X useflag is disabled globally)
- Create package.use/dummy with content <app-misc/dummy-3 X
- emerge =app-misc/dummy-3 has X disabled
- emerge =app-misc/dummy-3-r1 has X disabled
- emerge =app-misc/dummy-1 has X enabled
- emerge =app-misc/dummy-4 has X disabled
test case 13
Reproducer:
1)
package_use { "app-misc/dummy": use => "doc", target => "dummy", version => "~3", }
2) Run agent
Results:
- (assuming X useflag is disabled globally)
- Create package.use/dummy with content ~app-misc/dummy-3 X
- emerge =app-misc/dummy-3 has X enabled
- emerge =app-misc/dummy-3-r1 has X enabled
- emerge =app-misc/dummy-1 has X disabled
- emerge =app-misc/dummy-4 has X disabled
test case 14
Reproducer:
1)
package_use { "app-misc/dummy": use => "doc", target => "dummy", version => "3", }
2) Run agent
Results:
- (assuming X useflag is disabled globally)
- Create package.use/dummy with content =app-misc/dummy-3 X
- emerge =app-misc/dummy-3 has X enabled
- emerge =app-misc/dummy-3-r1 has X disabled
- emerge =app-misc/dummy-1 has X disabled
- emerge =app-misc/dummy-4 has X disabled
test case 15
Reproducer:
1)
package_use { "app-misc/dummy": use => "doc", target => "dummy", version => "=3*", }
2) Run agent
Results:
- (assuming X useflag is disabled globally)
- Create package.use/dummy with content =app-misc/dummy-3* X
- emerge =app-misc/dummy-3 has X enabled
- emerge =app-misc/dummy-3-r1 has X enabled
- emerge =app-misc/dummy-1 has X disabled
- emerge =app-misc/dummy-4 has X disabled