wjdp / htmltest

:white_check_mark: Test generated HTML for problems
MIT License
325 stars 54 forks source link

Documents in symlinked folder not tested #167

Open Simran-B opened 3 years ago

Simran-B commented 3 years ago

Describe the bug

If there is a symlinked folder in the directory path, its contained files are not checked. htmltest reports tested 0 documents.

To Reproduce

Test setup tree:

.
|-- bar
|   `-- foo -> ../foo
|-- foo
|   `-- index.html
`-- htmltest

Linux:

mkdir foo
echo 'test' > foo/index.html
mkdir bar
cd bar
ln -s ../foo foo
cd ..
./htmltest bar

Windows (in an elevated command prompt for mklink):

md foo
echo test > foo\index.html
md bar
cd bar
mklink /d foo ..\foo
cd ..
htmltest.exe bar

Expected behavior

htmltest should follow the symlink and test the files in foo as well. This behavior could be made optional with a configuration option to follow symlinks.

Actual behavior

htmltest ignores the symlink and bar/foo/index.html is not tested.

Versions