Delyan Angelov
f427a5241a
os,tools: add os.vtmp_dir()
...
Use it to consistently place all temporary files created by tests in a overridable folder specific to the user, that is easy to cleanup later.
NOTE: os.temp_dir() on macos returns `/tmp`, and using `/tmp/v` is a problem when multiple unix users are trying to access/create/write to it.
2022-11-03 10:19:51 +02:00
Alexander Medvednikov
c6158e4519
all: remove unnecessary IError() casts
2022-10-28 19:08:30 +03:00
Alexander Medvednikov
a134c09718
os: fix font.v compilation
2022-10-27 11:13:43 +03:00
Delyan Angelov
2083e6b04c
os: cleanup APIs returning !bool
to either return !
or bool
( #16111 )
2022-10-20 13:56:06 +03:00
Delyan Angelov
71bff213ef
builtin: make the C. WIN32 API declarations more precise, to catch errors earlier ( #16090 )
2022-10-17 20:23:33 +03:00
yuyi
556244576d
checker: check unused last expression in if ( fix #16084 ) ( #16088 )
2022-10-17 18:15:01 +03:00
Delyan Angelov
78e9362d74
ci: workaround for a VLS failing test, that stops symbol registration after the first fn()! {
2022-10-16 13:38:20 +03:00
yuyi
f6844e9766
all: change optional to result of io ( #16075 )
2022-10-16 09:28:57 +03:00
zztkm
3e4cfc7343
os: add os.to_slash and os.from_slash functions ( #16055 )
2022-10-14 10:22:36 +03:00
Delyan Angelov
6fcab013eb
os.notify: fix sizeof(C.epoll_event) == 12 with tcc (was 16, while with gcc/clang it is 12)
2022-09-29 13:27:07 +03:00
Dominik Pytlewski
721328ef58
os: fix os.read_file and os.read_bytes for 0 sized /proc/ files on Linux ( fix #15852 ) ( #15853 )
2022-09-25 22:54:46 +03:00
yuyi
c3548c9413
tests: omit testsuite_begin/end() optional ( #15871 )
2022-09-25 10:29:25 +03:00
Delyan Angelov
f338dec5c6
ci: fix compilation on FreeBSD (C.feof is a macro there, that expands to direct field access)
2022-09-24 10:17:32 +00:00
yuyi
d624ad50a7
os: fix file.read() ( #15861 )
2022-09-24 08:58:55 +03:00
yuyi
41dbd12bc4
tests: make error handling the same as the main function ( #15825 )
2022-09-21 19:45:43 +03:00
Delyan Angelov
69c9d47a40
pref,os,sokol,cgen: ease compilation of 2048 with -os wasm32_emscripten
( #15820 )
2022-09-20 00:17:13 +03:00
Delyan Angelov
f922ed0941
tests: unify all temporary files/folders under $VTMP/v
, that can be cleaned by v wipe-cache
( #15774 )
2022-09-16 04:56:19 +03:00
shove
8b962f8446
checker: fix nested struct reference type field initialized check. ( fix : #15741 ) ( #15752 )
2022-09-15 07:59:31 +03:00
jrfondren
45e21bc311
os: remove private unix_environ() helper function, it is not needed anymore ( #15654 )
2022-09-04 13:22:38 +03:00
Delyan Angelov
728b198384
os: extract dir_expansions_test.v from os_test.v
2022-09-01 13:07:29 +03:00
tr00
3eb6ad7b8c
os: fix type in error message ( #15533 )
2022-08-26 06:59:52 +03:00
Subhomoy Haldar
3b42f18dee
os: add input_password(prompt) and unit tests ( #15507 )
2022-08-23 18:17:38 +03:00
Delyan Angelov
a689641c1b
os: rewrite os.walk and os.walk_with_context to use iteration, instead of recursion
2022-08-22 17:27:14 +03:00
Delyan Angelov
21917f5b00
os: small cleanup of needless r'\' usage
2022-08-22 16:32:42 +03:00
Delyan Angelov
e156e6a44a
os: remove commented code in os_windows.c.v
2022-08-22 14:54:38 +03:00
Delyan Angelov
5cba5920d5
os: make find_abs_path_of_executable_test.v more robust ( fix #15459 )
2022-08-20 10:06:58 +03:00
Delyan Angelov
7ed3389fa8
ci: fix -cstrict checks after 7585e86
2022-08-17 18:40:15 +03:00
Delyan Angelov
7585e86868
os: reduce heap allocations done by os.real_path, os.executable, os.getwd
2022-08-17 17:06:38 +03:00
Delyan Angelov
18cccb6caf
builtin: show non zero codes on bubbled error_with_code(msg,code)
errors
2022-08-16 18:59:38 +03:00
Delyan Angelov
8f98f1db9e
os: fix os.open_file('text.txt', 'wb', 0o666)
, add test ( #15420 )
2022-08-14 09:50:05 +03:00
Vincenzo Palazzo
b01f71d9da
io: migrate the Reader
API to Result
instead of Option
( #15229 )
2022-08-08 02:33:25 +03:00
Delyan Angelov
242ade8938
os: fix File.eof on FreeBSD (feof is a C macro there)
2022-07-28 17:26:55 +03:00
Reuben Thomas
ed56c3957e
os: add File.reopen and File.eof methods ( #15184 )
2022-07-28 16:21:23 +03:00
Bastian Buck
4ab72ccb69
os: add a security advisory for potential TOCTOU risks when using os.is_writable
, os.is_executable
etc ( #15222 )
2022-07-26 12:02:48 +03:00
Andrew Compton
f9385f6300
os: make get_raw_line() should not break lines on \r on windows ( fix #5900 ) ( #15205 )
2022-07-25 08:03:07 +03:00
Reuben Thomas
2ffad85f06
doc: remove misleading comment about stdin() ( #15154 )
2022-07-23 00:22:50 +03:00
Alexander Medvednikov
9099594a49
all: wrap up unsafe { nil } (p. 3)
2022-07-21 21:01:30 +03:00
Delyan Angelov
02d675ab67
os: restore the env TERMUX_VERSION based final resort for runtime auto detection of Termux
2022-07-08 11:16:53 +03:00
Larpon
9f3b6e3e3a
android: provide more predictable logging, add comptime termux support ( #14984 )
2022-07-07 18:28:29 +03:00
Delyan Angelov
3308313167
os: remove the closing of stream handles at the end of Process.win_slurp/1
2022-07-06 15:43:13 +03:00
Alexander Medvednikov
819b6f475a
os: remove unnecessary unsafe
s
2022-07-06 07:07:48 +03:00
Alexander Medvednikov
163c7ba2bb
checker: stricter []&Type{len:x}
check
2022-07-05 23:51:29 +03:00
Larpon
0dd5050b29
os: clean up usage of ANativeActivity, allow access to fields ( #14948 )
2022-07-05 16:30:10 +03:00
Delyan Angelov
69d292e8d1
os: detect termux more reliably
2022-07-01 13:52:57 +03:00
Delyan Angelov
b6b611aa82
v: support better separation of general Android vs Termux specific code (part 2)
2022-07-01 13:18:31 +03:00
Delyan Angelov
30401e003f
v: support better separation of general Android vs Termux specific code (part 1)
2022-07-01 12:48:35 +03:00
Markus F.X.J. Oberhumer
74bb5ae17a
os: add an optional "mode" parameter to os.mkdir and os.mkdir_all ( #14887 )
2022-06-30 13:49:47 +03:00
ghosttk
fae26197b9
os: add exo-open
to the list of tried launchers in os.open_uri/1 ( #14884 )
...
Add 'exo-open' for xfce4 desktop environment.
2022-06-29 11:59:25 +03:00
Wertzui123
c10ba6d81a
os: add .cmd
to the list of Windows executable suffixes ( #14839 )
2022-06-23 20:12:29 +03:00
Larpon
298dc77c38
ci: add pure -os android
checks ( #14837 )
2022-06-23 11:22:55 +03:00