github.com/oweisse/u-root@v0.0.0-20181109060735-d005ad25fef1/cmds/elvish/eval/builtin_fn_fs_test.go (about) 1 package eval 2 3 import ( 4 "path/filepath" 5 "testing" 6 ) 7 8 func TestBuiltinFnFS(t *testing.T) { 9 pathSep := string(filepath.Separator) 10 runTests(t, []Test{ 11 That(`path-base a/b/c.png`).Puts("c.png"), 12 That(`tilde-abbr $E:HOME'` + pathSep + `'foobar`).Puts( 13 "~" + pathSep + "foobar"), 14 15 // see testmain_test.go for setup 16 That(`-is-dir ~/dir`).Puts(true), 17 That(`-is-dir ~/lorem`).Puts(false), 18 }) 19 }