From de90280aa0895d5b302a3137a3fa1a171a9f127c Mon Sep 17 00:00:00 2001 From: Gaƫtan Gilbert Date: Mon, 18 Jun 2018 14:26:23 +0200 Subject: Fix #7704: get_toplevel_path needs normalised argv.(0) When launched through PATH argv.(0) is just the command name. eg "coqtop -compile foo.v" -> argv.(0) = "coqtop" Using executable_name also follows symlinks but this isn't tested to avoid messing with windows. Running Coq through a symlink is not as important as PATH anyways. --- test-suite/misc/7704.sh | 7 +++++++ test-suite/misc/aux7704.v | 6 ++++++ 2 files changed, 13 insertions(+) create mode 100755 test-suite/misc/7704.sh create mode 100644 test-suite/misc/aux7704.v (limited to 'test-suite/misc') diff --git a/test-suite/misc/7704.sh b/test-suite/misc/7704.sh new file mode 100755 index 000000000..0ca2c97d2 --- /dev/null +++ b/test-suite/misc/7704.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -e + +export PATH=$BIN:$PATH + +${coqtop#"$BIN"} -compile misc/aux7704.v diff --git a/test-suite/misc/aux7704.v b/test-suite/misc/aux7704.v new file mode 100644 index 000000000..6fdcf6768 --- /dev/null +++ b/test-suite/misc/aux7704.v @@ -0,0 +1,6 @@ + +Goal True /\ True. +Proof. + split. + par:exact I. +Qed. -- cgit v1.2.3