diff options
| author | Pierre-Marie Pédrot | 2020-09-28 14:04:52 +0200 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2020-09-28 14:04:52 +0200 |
| commit | b9f385cb43de4c463e649f8f6e33f32288e88a6c (patch) | |
| tree | 56d34e30c27d90e32463bb613d97549bc515e143 /test-suite/misc | |
| parent | 9c2228ff011dc6188b70084fa1e1a5158affcf24 (diff) | |
| parent | 2b258e90df02448341c051ac21b84cf1c7c20428 (diff) | |
Merge PR #13053: [lib] make canonical_path_name always absolute (fix #13031)
Ack-by: SkySkimmer
Reviewed-by: ppedrot
Diffstat (limited to 'test-suite/misc')
| -rwxr-xr-x | test-suite/misc/coq_makefile_destination_of.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test-suite/misc/coq_makefile_destination_of.sh b/test-suite/misc/coq_makefile_destination_of.sh new file mode 100755 index 0000000000..fc8e089ccf --- /dev/null +++ b/test-suite/misc/coq_makefile_destination_of.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +export COQBIN=$BIN +export PATH=$COQBIN:$PATH + +TMP=`mktemp -d` +cd $TMP + +function assert_eq() { + if [ "$1" != "$2" ]; then + echo "coq_makefile generates destination" $1 "!=" $2 + cd / + rm -rf $TMP + exit 1 + fi +} + +assert_eq `coq_makefile -destination-of src/Y/Z/Test.v -Q src X` "X//Y/Z" +mkdir src +assert_eq `coq_makefile -destination-of src/Y/Z/Test.v -Q src X` "X//Y/Z" +mkdir -p src/Y/Z +touch src/Y/Z/Test.v +assert_eq `coq_makefile -destination-of src/Y/Z/Test.v -Q src X` "X//Y/Z" +cd / +rm -rf $TMP +exit 0 |
