File tree Expand file tree Collapse file tree 5 files changed +68
-1
lines changed Expand file tree Collapse file tree 5 files changed +68
-1
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ set(ERLANG_MODULES
34
34
erpc
35
35
erts_debug
36
36
ets
37
+ file
37
38
gen_event
38
39
gen_server
39
40
gen_statem
Original file line number Diff line number Diff line change
1
+ %
2
+ % This file is part of AtomVM.
3
+ %
4
+ % Copyright 2025 Software Mansion S.A.
5
+ %
6
+ % Licensed under the Apache License, Version 2.0 (the "License");
7
+ % you may not use this file except in compliance with the License.
8
+ % You may obtain a copy of the License at
9
+ %
10
+ % http://www.apache.org/licenses/LICENSE-2.0
11
+ %
12
+ % Unless required by applicable law or agreed to in writing, software
13
+ % distributed under the License is distributed on an "AS IS" BASIS,
14
+ % WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ % See the License for the specific language governing permissions and
16
+ % limitations under the License.
17
+ %
18
+ % SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
19
+ %
20
+
21
+ -module (file ).
22
+
23
+ -export ([native_name_encoding /0 ]).
24
+
25
+ -spec native_name_encoding () -> latin1 | utf8 .
26
+ native_name_encoding () ->
27
+ utf8 .
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ set(ERLANG_MODULES
49
49
test_timer
50
50
test_supervisor
51
51
test_lists_subtraction
52
+ test_file
52
53
test_tcp_socket
53
54
test_udp_socket
54
55
notify_init_server
Original file line number Diff line number Diff line change
1
+ %
2
+ % This file is part of AtomVM.
3
+ %
4
+ % Copyright 2025 Tomasz Sobkiewicz <tomasz.sobkiewicz@swmansion.com>
5
+ %
6
+ % Licensed under the Apache License, Version 2.0 (the "License");
7
+ % you may not use this file except in compliance with the License.
8
+ % You may obtain a copy of the License at
9
+ %
10
+ % http://www.apache.org/licenses/LICENSE-2.0
11
+ %
12
+ % Unless required by applicable law or agreed to in writing, software
13
+ % distributed under the License is distributed on an "AS IS" BASIS,
14
+ % WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ % See the License for the specific language governing permissions and
16
+ % limitations under the License.
17
+ %
18
+ % SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
19
+ %
20
+
21
+ -module (test_file ).
22
+ -export ([start /0 , test /0 ]).
23
+
24
+ start () ->
25
+ test ().
26
+
27
+ test () ->
28
+ Res = file :native_name_encoding (),
29
+ ok = is_proper_encoding (Res ),
30
+ ok .
31
+
32
+ is_proper_encoding (utf8 ) ->
33
+ ok ;
34
+ is_proper_encoding (latin1 ) ->
35
+ ok ;
36
+ is_proper_encoding (_ ) ->
37
+ error .
Original file line number Diff line number Diff line change @@ -81,7 +81,8 @@ get_non_networking_tests(_OTPVersion) ->
81
81
test_spawn ,
82
82
test_supervisor ,
83
83
test_lists_subtraction ,
84
- test_os
84
+ test_os ,
85
+ test_file
85
86
].
86
87
87
88
get_networking_tests (OTPVersion ) when
You can’t perform that action at this time.
0 commit comments