sync code with last improvements from OpenBSD
This commit is contained in:
commit
88965415ff
26235 changed files with 29195616 additions and 0 deletions
39
util/makedepend/tests/1/makedep.sh
Normal file
39
util/makedepend/tests/1/makedep.sh
Normal file
|
@ -0,0 +1,39 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Test case for bug https://gitlab.freedesktop.org/xorg/util/makedepend/issues/1
|
||||
|
||||
set -e
|
||||
|
||||
if [ "x$test_srcdir" = "x" ]; then
|
||||
test_srcdir=..
|
||||
fi
|
||||
|
||||
if [ "x$test_builddir" = "x" ]; then
|
||||
test_builddir=..
|
||||
fi
|
||||
|
||||
if [ "x$MAKEDEPEND" = "x" ]; then
|
||||
MAKEDEPEND=makedepend
|
||||
fi
|
||||
|
||||
mkdir -p ${test_builddir}/1
|
||||
cd ${test_builddir}/1
|
||||
|
||||
pwd
|
||||
|
||||
# Create test conditions:
|
||||
# - directory named "one" containing file one.cpp which includes def.h in the same directory
|
||||
# - directory named "two" containing file two.cpp which includes def.h in the same directory
|
||||
mkdir -p one two
|
||||
|
||||
# 2 headers with the same name but in different directories
|
||||
touch one/def.h two/def.h
|
||||
cp ${test_srcdir}/1/one.cpp one/
|
||||
cp ${test_srcdir}/1/two.cpp two/
|
||||
|
||||
# two/two.cpp depends on two/def.h (not the one seen during exploration in previous directory)
|
||||
$MAKEDEPEND -f- -I. one/one.cpp two/two.cpp | grep "two/two.o: one/def.h" && false
|
||||
|
||||
|
||||
# Clean up
|
||||
rm -rf one two
|
1
util/makedepend/tests/1/one.cpp
Normal file
1
util/makedepend/tests/1/one.cpp
Normal file
|
@ -0,0 +1 @@
|
|||
#include "def.h"
|
1
util/makedepend/tests/1/two.cpp
Normal file
1
util/makedepend/tests/1/two.cpp
Normal file
|
@ -0,0 +1 @@
|
|||
#include "def.h"
|
Loading…
Add table
Add a link
Reference in a new issue