bin: fix handling for --output & --format with LTL outputs

* bin/common_output.cc: Set the output stream for LTL formats.
* tests/core/serial.test: Add a test case about this issue that also
improve the covering of the previous patch about saving file
descriptors.
This commit is contained in:
Alexandre Duret-Lutz 2023-07-26 21:33:36 +02:00
parent 7f1a33cc61
commit 0923f8efe2
3 changed files with 18 additions and 1 deletions

View file

@ -225,7 +225,7 @@ namespace
}
};
class formula_printer final: protected spot::formater
class formula_printer final: public spot::formater
{
public:
formula_printer(std::ostream& os, const char* format)
@ -399,6 +399,7 @@ output_formula(std::ostream& out,
{
formula_with_location fl = { f, filename, linenum,
index, prefix, suffix };
format->set_output(out);
format->print(fl, ptimer);
}
}