[policy-gen] Fix the code to actually use the correct capture group
Summary:
This was a mistake in porting form QRegExp::capturedTexts() to QRegularExpression;
capturedTexts(1) translates to QRegularExpressionMatch::captured(1), not 0.
Thanks to brouilk for reporting it in https://phabricator.kde.org/D26118.
Add examples of the text we're matching against.
Add unit test that executes kauth-policy-gen on a .actions ini-formatted
file (based on .actions file from the plymouth-kcm repo) and compare the
output to a reference .policy file.
Test Plan: make && ctest
Reviewers: Frameworks, dfaure, apol, davidedmundson
Reviewed By: davidedmundson
Subscribers: kde-frameworks-devel
Tags: Frameworks
Differential Revision: https://phabricator.kde.org/D27288