Problem solved.
Here is the story:
I my package I putted a .Rinstignore file with this line:
test/*
I was expecting glob-style matching (like .gitignore) but instead, as RShowDoc("R-exts")
say:
.Rinstignore does perl-style regular expression matching.
So, my rule test/*
was interpreted by R as:
Ignore all files starting with test followed by 0 or more '/'
(the part /* was interpreted as match zero or more / characters)
A quick check with grep
show how this work:
grep("test/*", "inst/unitTests/test_bar.R",perl=TRUE)
[1] 1
Removing the line
test/*
from .Rinstignore solved the problem.