── test
├── dune
├── test_program.ml
└── foo_files
├── foo_a
└── foo_b
使用
test_program
运行时foo_files
如何找到文件夹dune test
下的文件?
我可以看到,当程序运行时,当前工作目录是
_build/default/test
并且foo_files
文件夹没有复制到那里。
我想有一种更惯用的方法,但由于测试程序只能从存储库副本中的
dune test
运行,因此相对路径目前工作正常,例如:
"../../../test/foo_files"