Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/seed/host/tests/chdir.om # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / seed / host / tests / chdir.om` 32 lines ยท 480 bytes Raw Blame History 1 note chdir: create a directory, enter it, create a relative file there, return, and refuse a missing path. 2 text dsub "sub" 3 text dfile "inside" 4 text dup ".." 5 text dno "nope" 6 fn main to int 7 r = makedir dsub 0 len dsub 493 8 if ne r 0 9 ret 1 10 end 11 r = chdir dsub 0 len dsub 12 if ne r 0 13 ret 2 14 end 15 fd = int fopen dfile 0 len dfile 577 420 16 if lt fd 0 17 ret 3 18 end 19 r = fclose fd 20 if ne r 0 21 ret 4 22 end 23 r = chdir dup 0 len dup 24 if ne r 0 25 ret 5 26 end 27 r = chdir dno 0 len dno 28 if ge r 0 29 ret 6 30 end 31 ret 0 32 end