From 23600ed8988adbcfb1a7f1d0d4ced139da4f12ab Mon Sep 17 00:00:00 2001 From: Adam Samalik Date: Mon, 10 Jul 2023 14:11:54 +0200 Subject: [PATCH] re-import sources as agreed with the maintainer --- .fmf/version | 1 + .gitignore | 15 ++++++++- ci.fmf | 6 ++++ tests/psl-smoke/.gitignore | 1 + tests/psl-smoke/main.fmf | 4 +++ tests/psl-smoke/psl-input.txt | 41 +++++++++++++++++++++++++ tests/psl-smoke/psl-output-expected.txt | 41 +++++++++++++++++++++++++ tests/psl-smoke/runtest.sh | 18 +++++++++++ 8 files changed, 126 insertions(+), 1 deletion(-) create mode 100644 .fmf/version create mode 100644 ci.fmf create mode 100644 tests/psl-smoke/.gitignore create mode 100644 tests/psl-smoke/main.fmf create mode 100644 tests/psl-smoke/psl-input.txt create mode 100644 tests/psl-smoke/psl-output-expected.txt create mode 100755 tests/psl-smoke/runtest.sh diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/.gitignore b/.gitignore index 49d3c70..fdf2ec2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,15 @@ -SOURCES/libpsl-0.20.2.tar.gz +/libpsl-0.5.0.tar.gz +/libpsl-0.5.1.tar.gz +/libpsl-0.6.2.tar.gz +/libpsl-0.7.0.tar.gz +/libpsl-0.7.1.tar.gz +/libpsl-0.12.0.tar.gz +/libpsl-0.13.0.tar.gz +/libpsl-0.14.0.tar.gz +/libpsl-0.15.0.tar.gz +/libpsl-0.16.1.tar.gz +/libpsl-0.17.0.tar.gz +/libpsl-0.18.0.tar.gz +/libpsl-0.19.1.tar.gz +/libpsl-0.20.1.tar.gz /libpsl-0.20.2.tar.gz diff --git a/ci.fmf b/ci.fmf new file mode 100644 index 0000000..42a289d --- /dev/null +++ b/ci.fmf @@ -0,0 +1,6 @@ +summary: + Run all tests +discover: + how: fmf +execute: + how: shell diff --git a/tests/psl-smoke/.gitignore b/tests/psl-smoke/.gitignore new file mode 100644 index 0000000..14b933b --- /dev/null +++ b/tests/psl-smoke/.gitignore @@ -0,0 +1 @@ +/psl-output.txt diff --git a/tests/psl-smoke/main.fmf b/tests/psl-smoke/main.fmf new file mode 100644 index 0000000..4b62fcb --- /dev/null +++ b/tests/psl-smoke/main.fmf @@ -0,0 +1,4 @@ +summary: Basic test based on psl executable +test: ./runtest.sh +require: + - psl diff --git a/tests/psl-smoke/psl-input.txt b/tests/psl-smoke/psl-input.txt new file mode 100644 index 0000000..51657a5 --- /dev/null +++ b/tests/psl-smoke/psl-input.txt @@ -0,0 +1,41 @@ +. +.com +.ieee +aeroclub.aero +alibaba +australia.museum +bugzilla.redhat.com +christmas +christmas.fun +city.kawasaki.jp +co.cz +co.us +com.ag +cz.eu.org +debian.net +dudka.cz +dyn-o-saur.com +eu.com +football +fr +fukushima.jp +gitlab.io +gov.kg +host +iki.fi +is.gov.pl +kawakita.ishikawa.jp +kdudka.guru +kdudka.transurl.eu +no-ip.co.uk +org +org.ac +realm.cz +redhat.com +static-access.net +us.org +us-east-1.amazonaws.com +xxx.kawasaki.jp +個人.香港 +組织.hk +鹿児島.jp diff --git a/tests/psl-smoke/psl-output-expected.txt b/tests/psl-smoke/psl-output-expected.txt new file mode 100644 index 0000000..3c8c6ef --- /dev/null +++ b/tests/psl-smoke/psl-output-expected.txt @@ -0,0 +1,41 @@ +.: 1 (.) +.com: 1 (.com) +.ieee: 1 (.ieee) +aeroclub.aero: 1 (aeroclub.aero) +alibaba: 1 (alibaba) +australia.museum: 1 (australia.museum) +bugzilla.redhat.com: 0 (bugzilla.redhat.com) +christmas: 1 (christmas) +christmas.fun: 0 (christmas.fun) +city.kawasaki.jp: 0 (city.kawasaki.jp) +co.cz: 1 (co.cz) +co.us: 1 (co.us) +com.ag: 1 (com.ag) +cz.eu.org: 1 (cz.eu.org) +debian.net: 1 (debian.net) +dudka.cz: 0 (dudka.cz) +dyn-o-saur.com: 1 (dyn-o-saur.com) +eu.com: 1 (eu.com) +football: 1 (football) +fr: 1 (fr) +fukushima.jp: 1 (fukushima.jp) +gitlab.io: 1 (gitlab.io) +gov.kg: 1 (gov.kg) +host: 1 (host) +iki.fi: 1 (iki.fi) +is.gov.pl: 1 (is.gov.pl) +kawakita.ishikawa.jp: 1 (kawakita.ishikawa.jp) +kdudka.guru: 0 (kdudka.guru) +kdudka.transurl.eu: 1 (kdudka.transurl.eu) +no-ip.co.uk: 1 (no-ip.co.uk) +org: 1 (org) +org.ac: 1 (org.ac) +realm.cz: 1 (realm.cz) +redhat.com: 0 (redhat.com) +static-access.net: 1 (static-access.net) +us.org: 1 (us.org) +us-east-1.amazonaws.com: 1 (us-east-1.amazonaws.com) +xxx.kawasaki.jp: 1 (xxx.kawasaki.jp) +個人.香港: 1 (個人.香港) +組织.hk: 1 (組织.hk) +鹿児島.jp: 1 (鹿児島.jp) diff --git a/tests/psl-smoke/runtest.sh b/tests/psl-smoke/runtest.sh new file mode 100755 index 0000000..38b15ac --- /dev/null +++ b/tests/psl-smoke/runtest.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# exit immediately if any command returns non-zero exit code +set -e + +# print commands as they are executed by the shell interpreter +set -x + +# print versions of related pkgs +rpm -q {,lib}psl libidn2 +psl --version +ldd /usr/bin/psl + +# process the test input with (lib)psl +psl < psl-input.txt > psl-output.txt + +# compare the output with expected output +diff -u psl-output{-expected,}.txt