It is now possible to acquire/release filedescriptors for existing files and files to be created. Filedescriptors are managed in a registry by refcounts, they get automatically destructed when the last user releases them.
26 lines
447 B
Text
26 lines
447 B
Text
|
|
TESTING "Filedescriptor management" ./test-filedescriptors
|
|
|
|
echo testdata > ,tmp_testfile
|
|
|
|
TEST "acquire existing file" acquire_existing <<END
|
|
return: 0
|
|
END
|
|
|
|
TEST "acquire existing file twice" acquire_existing_again <<END
|
|
return: 0
|
|
END
|
|
|
|
rm ,tmp_testfile
|
|
|
|
TEST "acquire file, creating it" acquire_create <<END
|
|
return: 0
|
|
END
|
|
|
|
rm ,tmp_testfile
|
|
|
|
TEST "acquire file, creating it, nested dir" acquire_create_dir <<END
|
|
return: 0
|
|
END
|
|
|
|
rm ,tmp_testdir -r
|