convert an array of paths to cli compatible list of paths, suitable for setting as an environment variable.

import { assertEquals } from "jsr:@std/assert"

// aliasing our functions for brevity
const eq = assertEquals, fn = pathsToCliArg

// conversion example with windows separator (";")
eq(fn(";", [
"./a/b/c.txt",
"C:\\Android Studio\\sdk\\",
"build\\libs\\"
]), `"./a/b/c.txt;C:/Android Studio/sdk/;build/libs/"`)

// conversion example with unix separator (":")
eq(fn(":", [
"./a/b/c.txt",
"~/Android Studio/sdk/",
"build/libs/"
]), `"./a/b/c.txt:~/Android Studio/sdk/:build/libs/"`)