[Omake] Symlink behavior bugs and related questions
Brian Downing
bdowning at lavos.net
Fri Dec 25 12:49:25 PST 2009
On Fri, Dec 25, 2009 at 02:38:17PM -0600, Brian Downing wrote:
> I've attached a testcase for these issues.
And here it actually is.
Merry Christmas. :)
-bcd
-------------- next part --------------
DefineCommandVars()
OMakeFlags(--verbose)
Shell.object-foreach(name, value):
println($(name))
.SUBDIRS: .
tcase(pass, msg) =
println($"$(if $(pass), PASS, FAIL) $(msg)")
ttest(args, msg) =
real = $(equal $(shell-code "test" $(args)), 0)
tcase($(equal $(real), $(test $(args))), $"$(args) ($(msg))")
.DEFAULT:
section
"rm" -rf test important
mkdir test
mkdir important
touch important/file
section
cd test
touch foo
ln -s foo bar
ln -s foo baz
ttest(-f foo, file)
ttest(-f bar, symlink)
ttest(-f baz, broken symlink)
ttest(-L foo, file)
ttest(-L bar, symlink)
ttest(-L baz, broken symlink)
ln -s ../important oops
rm -rf test
tcase($(not $(test -d test)), test directory deleted)
tcase($(test -f important/file), important file preserved)
"rm" -rf test important
More information about the Omake
mailing list