Hi Christian --
On Tue, Jan 26, 2021 at 02:58:45PM +0100, Christian Grün scripsit:
If this is the contents of "count.xq"…
declare variable $file external; count($file => file:read-text() => string-to-codepoints())
…you can use the -b flag to bind a value to a variable:
basex -b file=abs-or-rel-path/to/input.txt count.xq
I’m not sure if that helps. Feel free to give us more information on your use case. A minimized test case would be very appreciated.
Thank you!
That does help.
The core problem was having a bunch of file locations in variables.
These have a common base (the project directory) which is different on every developer's system.
"How do we get the query with the tests to run consistently without having to manually update those variables?" is solvable with a combination of the -b flag above and file:resolve-path(), which is the problem I was trying to solve.
Thank you! Graydon