bin: reset column specification between files

* bin/common_finput.cc (job_processor::process_file): Reset
col_to_read.
* tests/core/ltlfilt.test: Test it.
* NEWS: Mention the bug.
This commit is contained in:
Alexandre Duret-Lutz 2022-05-17 11:11:23 +02:00
parent d697f57a97
commit d35f7bd37c
3 changed files with 21 additions and 2 deletions

View file

@ -1,6 +1,6 @@
#! /bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2013-2020 Laboratoire de Recherche et Développement de
# Copyright (C) 2013-2020, 2022 Laboratoire de Recherche et Développement de
# l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
@ -562,3 +562,17 @@ f1=`genltl --pps-arbiter-standard=2`
f2=`genltl --pps-arbiter-strict=2`
run 1 ltlfilt -f "$f2" --implied-by "$f1"
run 0 ltlfilt -f "$f1" --implied-by "$f2"
# Reading two different columns of the same file
echo a,b > file
run 0 ltlfilt -Ffile/1 -Ffile/2 --stats=%f >out
cat >expected <<EOF
a
b
EOF
diff expected out
# We used to have a bug where a column specification on one file
# would stick to the rest of the file unless overridden.
run 2 ltlfilt -Ffile/1 -Ffile
: