From cdf699ff23adf15bb04a685652b8e2955adca1a3 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Wed, 22 Mar 2017 14:06:02 +0100 Subject: [PATCH] genltl: fix %F for --r-left and --r-right Fixes #247. * bin/genltl.cc: Here. * tests/core/genltl.test: Make sure %F always return a correct pattern name.. * NEWS: Mention the bug. --- NEWS | 3 +++ bin/genltl.cc | 4 ++-- tests/core/genltl.test | 8 ++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 4935340f1..cad2abe75 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,9 @@ New in spot 2.3.2.dev (not yet released) - In "lenient" mode the parser would fail to recover from a missing closing brace. + - The output of 'genltl --r-left=1 --r-right=1 --format=%F' + had typos. + New in spot 2.3.2 (2017-03-15) Tools: diff --git a/bin/genltl.cc b/bin/genltl.cc index 4c1fc995c..dc812d7be 100644 --- a/bin/genltl.cc +++ b/bin/genltl.cc @@ -223,8 +223,8 @@ const char* const class_name[LAST_CLASS - FIRST_CLASS] = "or-fg", "or-g", "or-gf", - "or-r-left", - "or-r-right", + "r-left", + "r-right", "rv-counter", "rv-counter-carry", "rv-counter-carry-linear", diff --git a/tests/core/genltl.test b/tests/core/genltl.test index 67b30fe8c..88ddae403 100755 --- a/tests/core/genltl.test +++ b/tests/core/genltl.test @@ -21,6 +21,14 @@ . ./defs set -e +# Make sure the name of each pattern is correctly output by %F. +opts=`genltl --help | sed -n '/=RANGE/{ +s/^ *// +s/[=[].*/=1/p +}'` +res=`genltl $opts --format="--%F=%L"` +test "$opts" = "$res" + run 0 genltl --dac=1..5 --eh=1..5 --pos --neg --format="%F:%L %f" >output cat >expected <