Felipe Pena
cb976c7e17
os: fix the declaration of C.ptrace
(the 4th parameter is a pointer, not an integer) ( #17366 )
2023-02-20 12:29:49 +02:00
Swastik Baranwal
e9a3817aed
checker: disallow enum initalization ( #17361 )
2023-02-19 22:22:07 +01:00
Ahmad Yasser
cad2cd5583
docs: fix typos using codespell ( #17332 )
2023-02-16 11:43:39 +02:00
Delyan Angelov
b13f7118ab
os,term: fix C.tcsetattr declaration (add missing int return type)
2023-02-13 15:16:23 +02:00
MatejMagat305
954843c486
os: fix default result of os.temp_dir() for termux ( #17237 )
2023-02-07 00:07:35 +02:00
Thomas Peißl
3aeb6179b7
os: rework mv so it works with different partitions (add fallback to os.mv_by_cp + tests) ( #17065 )
2023-01-22 19:02:04 +02:00
Delyan Angelov
f69b994c73
os: properly document os.uname, for both nix and windows
2023-01-22 13:18:28 +02:00
Roy Ivy III
dd55365dee
os: cleanup the output of os.uname() on windows ( #17066 )
...
* os: (WinOS) mimic current practices of `busybox` and `coreutils`
* os: trim any possible surounding whitespace
2023-01-22 11:59:42 +02:00
Thomas Peißl
ba1b31700e
os: add hint for mv_by_cp to mv ( #17036 )
2023-01-19 16:50:57 +02:00
Yochem van Rosmalen
0109fe66a6
os: make os.FileMode public ( #16923 )
2023-01-09 22:34:36 +02:00
Alexander Medvednikov
868908b80d
checker: require unsafe for Struct(voidptr) casts
2023-01-06 09:28:11 +03:00
Delyan Angelov
3625a74ec5
os: add test for os.open_append ( #16846 )
...
* os: add test for os.open_append
* fix unclosed file in test_eof (it made os.open_append fail only on windows, since it got the previous file content, because the file was locked, and os.rm could not delete it)
2023-01-03 01:11:35 +02:00
yuyi
b171102b03
os: minor optimization in os.v ( #16791 )
2022-12-28 10:28:47 +02:00
yuyi
68883fc4d9
os: fix os.file_ext('/tmp/.gitignore')
previously returning '.gitignore' => it now returns '' ( #16771 )
2022-12-26 12:53:38 +02:00
Felipe Pena
6a179a2926
checker: add int signedness mismatch checking for function call arguments ( #16750 )
2022-12-24 06:28:35 +02:00
Delyan Angelov
e419faf746
all: fix dependant
->dependent
typos, cleanup comments
2022-12-02 12:51:10 +02:00
yuyi
f16722596c
all: replace generic '<>' with '[]' in error messages and comments ( #16571 )
2022-12-02 09:22:48 +02:00
yuyi
ef5be22f81
all: replace generic <>
with []
- part 2 ( #16536 )
2022-11-26 18:23:26 +02:00
Delyan Angelov
9bb1867be0
os: refactor err == IError(os.Eof{})
to err is os.Eof
2022-11-16 00:53:45 +02:00
yuyi
017ace6ea7
vfmt: change all '$expr' to '${expr}' ( #16428 )
2022-11-15 16:53:13 +03:00
shove
26d643fc5d
all: rollback to old interpolation (step 3) ( #16380 )
2022-11-10 15:05:34 +03:00
Swastik Baranwal
ca484430e0
checker: check int overflow for const vars ( #16332 )
2022-11-06 08:22:28 +03:00
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