From e9bd8cd805b7b350fe3a970e6be1c9ea2e88a1e8 Mon Sep 17 00:00:00 2001 From: Emilio Jesus Gallego Arias Date: Tue, 8 May 2018 00:52:33 +0200 Subject: [toplevel] Don't ignore output filename provided by user in -o This was a silly bug introduced in 675a1dc401eb9a5540ba5bc9a522c1f84d4c3d54 that forgot to properly forward the command line option. Thanks to @SkySkimmer for finding out the problem. closes #7447 --- toplevel/coqtop.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/toplevel/coqtop.ml b/toplevel/coqtop.ml index 38351a377a..809490166c 100644 --- a/toplevel/coqtop.ml +++ b/toplevel/coqtop.ml @@ -315,11 +315,12 @@ let compile cur_feeder opts ~echo ~f_in ~f_out = CoqworkmgrApi.giveback 1 let compile_file cur_feeder opts (f_in, echo) = + let f_out = opts.compilation_output_name in if !Flags.beautify then Flags.with_option Flags.beautify_file - (fun f_in -> compile cur_feeder opts ~echo ~f_in ~f_out:None) f_in + (fun f_in -> compile cur_feeder opts ~echo ~f_in ~f_out) f_in else - compile cur_feeder opts ~echo ~f_in ~f_out:None + compile cur_feeder opts ~echo ~f_in ~f_out let compile_files cur_feeder opts = let compile_list = List.rev opts.compile_list in -- cgit v1.2.3 From 73e91542293af304ff25db9d3ea5495a9aa95249 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Wed, 9 May 2018 14:22:18 +0200 Subject: test for coqc -o --- test-suite/misc/coqc_dash_o.sh | 15 +++++++++++++++ test-suite/misc/coqc_dash_o.v | 1 + 2 files changed, 16 insertions(+) create mode 100755 test-suite/misc/coqc_dash_o.sh create mode 100644 test-suite/misc/coqc_dash_o.v diff --git a/test-suite/misc/coqc_dash_o.sh b/test-suite/misc/coqc_dash_o.sh new file mode 100755 index 0000000000..f303214b9a --- /dev/null +++ b/test-suite/misc/coqc_dash_o.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +DOUT=misc/tmp_coqc_dash_o/ +OUT=${DOUT}coqc_dash_o.vo + + +mkdir -p "${DOUT}" +rm -f "${OUT}" +$coqc misc/coqc_dash_o.v -o "${OUT}" +if [ ! -f "${OUT}" ]; then + printf "coqc -o not working" + exit 1 +fi +rm -fr "${DOUT}" +exit 0 diff --git a/test-suite/misc/coqc_dash_o.v b/test-suite/misc/coqc_dash_o.v new file mode 100644 index 0000000000..7426dff1a0 --- /dev/null +++ b/test-suite/misc/coqc_dash_o.v @@ -0,0 +1 @@ +Definition x := nat. -- cgit v1.2.3