rdopkg pkgenv(7)
================
:doctype: manpage


NAME
----
rdopkg-feature-pkgenv - autogenerated from feature spec `pkgenv.feature`


SYNOPSIS
--------

Displaying package environment details is a core feature.


SCENARIOS
---------

rdopkg pkgenv basic usage
~~~~~~~~~~~~~~~~~~~~~~~~~

* *_Given_* a distgit at Version 1.0.0 and Release 0.1,
* *_Given_* a patches branch with 2 patches,
* *_When_* I run rdopkg pkgenv,
* *_Then_* command output contains 'Patches style:\s+branch',
* *_Then_* command output contains 'Patches base:\s+N/A',
* *_Then_* command output contains 'Patches base ref:\s+1.0.0 : existing git tag',
* *_Then_* command output contains 'Version:\s+1.0.0',
* *_Then_* command output contains 'VR:\s+1:1.0.0-0.1',
* *_Then_* command output contains 'Release style:\s+generic',
* *_Then_* command output contains 'Rls bump index:\s+last-numeric',
* *_Then_* command output contains 'Local patches branch:\s+master-patches : \w+',
* *_Then_* no new commit was created

rdopkg pkgenv without version tag and patches branch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* *_Given_* a distgit at Version 0.1 and Release 2,
* *_When_* I run rdopkg pkgenv,
* *_Then_* command output contains 'VR:\s+1:0.1-2',
* *_Then_* command output contains 'Patches base:\s+N/A',
* *_Then_* command output contains 'Patches base ref:\s+0.1 : invalid git reference',
* *_Then_* command output contains 'Local patches branch:\s+master-patches : not found'

rdopkg pkgenv with valid patches_base
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* *_Given_* a distgit at Version 23 and Release 69,
* *_Given_* a patches branch with 2 patches,
* *_When_* I set .spec file patches_base to existing commit +42,
* *_When_* I run rdopkg pkgenv,
* *_Then_* command output contains 'Version:\s+23',
* *_Then_* command output contains 'VR:\s+1:23-69',
* *_Then_* command output contains 'Patches base:\s+\w+\+42',
* *_Then_* command output contains 'Patches base ref:\s+\w+ : existing git commit',
* *_Then_* command output contains 'Local patches branch:\s+master-patches : \w+'

rdopkg pkgenv with invalid patches_base
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* *_Given_* a distgit at Version 0 and Release 0,
* *_Given_* a patches branch with 2 patches,
* *_When_* I set .spec file patches_base=OVER+9000,
* *_When_* I run rdopkg pkgenv,
* *_Then_* command output contains 'Version:\s+0',
* *_Then_* command output contains 'VR:\s+1:0-0',
* *_Then_* command output contains 'Patches base:\s+OVER\+9000',
* *_Then_* command output contains 'Patches base ref:\s+OVER : invalid git reference'

