Consider:
emacs -nw -Q -batch -L "`pwd`" -l test.el
if the test.el file above is in a non-true path, e.g. a parent dir is a
symlink, and test.el has an eval-after-load for itself, the eval-after-load
form will not be evaluated, the reason is that startup.el does not use
file-truename while loading file, the change below solved the issue:
- (file-ex (expand-file-name file)))
+ (file-ex (file-truename (expand-file-name file))))