public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jens Petersen <petersen@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/unicode-ucd] rawhide: test.py now takes a filepath and is run in %check too
Date: Thu, 17 Sep 2026 08:19:41 GMT [thread overview]
Message-ID: <178963318161.1.2613225939235961522.rpms-unicode-ucd-5c5da87f637a@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/unicode-ucd
Branch : rawhide
Commit : 5c5da87f637aa9cb85f58f454042b015180c72a4
Author : Jens Petersen <petersen@redhat.com>
Date : 2026-09-17T16:19:04+08:00
Stats : +23/-5 in 4 file(s)
URL : https://src.fedoraproject.org/rpms/unicode-ucd/c/5c5da87f637aa9cb85f58f454042b015180c72a4?branch=rawhide
Log:
test.py now takes a filepath and is run in %check too
- make test.py executable
---
diff --git a/test.py b/test.py
new file mode 120000
index 0000000..58393dc
--- /dev/null
+++ b/test.py
@@ -0,0 +1 @@
+tests/parse/test.py
\ No newline at end of file
diff --git a/tests/parse/main.fmf b/tests/parse/main.fmf
index f972409..0fd28eb 100644
--- a/tests/parse/main.fmf
+++ b/tests/parse/main.fmf
@@ -2,5 +2,5 @@ summary: parse unicode data
require:
- unicode-ucd
- python3
-test: python3 test.py
+test: ./test.py /usr/share/unicode/ucd/UnicodeData.txt
framework: shell
diff --git a/tests/parse/test.py b/tests/parse/test.py
old mode 100644
new mode 100755
index 465dcbf..641a93a
--- a/tests/parse/test.py
+++ b/tests/parse/test.py
@@ -1,10 +1,18 @@
#!/usr/bin/env python3
-codepoints = 0
+import sys
+
+script_name = sys.argv[0]
-file = '/usr/share/unicode/ucd/UnicodeData.txt'
+try:
+ filepath = sys.argv[1]
+except IndexError:
+ print(f"Usage: {script_name} <filepath>", file=sys.stderr)
+ sys.exit(1)
+
+codepoints = 0
-with open(file, mode='rt', encoding='ascii') as unicode_data:
+with open(filepath, mode='rt', encoding='ascii') as unicode_data:
for line in unicode_data.readlines():
codepoint_string, name, category = line.split(';')[:3]
codepoint = int(codepoint_string, 16)
diff --git a/unicode-ucd.spec b/unicode-ucd.spec
index 2a4a7ac..8e7b5aa 100644
--- a/unicode-ucd.spec
+++ b/unicode-ucd.spec
@@ -4,7 +4,7 @@
Name: unicode-ucd
Version: 18.0.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Unicode Character Database
# http://www.unicode.org/terms_of_use.html in ReadMe.txt redirects to:
@@ -17,7 +17,9 @@ URL: http://www.unicode.org/ucd/
Source0: https://www.unicode.org/Public/%{version}/ucd/UCD.zip
Source1: https://www.unicode.org/Public/%{version}/ucd/Unihan.zip
Source2: https://www.unicode.org/license.txt
+Source3: test.py
BuildArch: noarch
+BuildRequires: python3
%description
The Unicode Character Database (UCD) consists of a number of data files listing
@@ -52,6 +54,10 @@ cp -p %{SOURCE1} %{buildroot}%{ucddir}
cp %{SOURCE2} .
+%check
+%{SOURCE3} %{buildroot}%{ucddir}/UnicodeData.txt
+
+
%files
%license license.txt
%dir %{unicodedir}
@@ -63,6 +69,9 @@ cp %{SOURCE2} .
%changelog
+* Thu Sep 17 2026 Jens Petersen <petersen@redhat.com> - 18.0.0-2
+- run test.py script also in the check section
+
* Thu Sep 17 2026 Jens Petersen <petersen@redhat.com> - 18.0.0-1
- https://www.unicode.org/versions/Unicode18.0.0/ (#2434378)
- https://blog.unicode.org/2026/09/announcing-unicode-standard-version-180.html
reply other threads:[~2026-09-17 8:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178963318161.1.2613225939235961522.rpms-unicode-ucd-5c5da87f637a@fedoraproject.org \
--to=petersen@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox