From 2181f9f0eb11a5424c48283f115310b716813a23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Mangano-Tarumi?= Date: Sun, 28 Oct 2018 14:12:55 -0400 Subject: [PATCH] t: use git to detect the version number --- t/meta.t | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/t/meta.t b/t/meta.t index 0e8ae25..8c5a849 100644 --- a/t/meta.t +++ b/t/meta.t @@ -7,18 +7,19 @@ use warnings; use Test::More tests => 5; my $opustags = './opustags'; +chomp(my $version = `git describe --tags --abbrev=0`); BAIL_OUT("$opustags does not exist or is not executable") if (! -x $opustags); -is(`$opustags`, <<'EOF', 'no options show the usage'); -opustags version 1.1.1 +is(`$opustags`, <<"EOF", 'no options show the usage'); +opustags version $version Usage: opustags --help opustags [OPTIONS] FILE opustags OPTIONS FILE -o FILE EOF -is(`$opustags --help`, <<'EOF', '--help displays the help message'); -opustags version 1.1.1 +is(`$opustags --help`, <<"EOF", '--help displays the help message'); +opustags version $version Usage: opustags --help opustags [OPTIONS] FILE