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
3434 erpc
3535 erts_debug
3636 ets
37+ file
3738 gen_event
3839 gen_server
3940 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
4949 test_timer
5050 test_supervisor
5151 test_lists_subtraction
52+ test_file
5253 test_tcp_socket
5354 test_udp_socket
5455 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 <[email protected] >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) ->
8181 test_spawn ,
8282 test_supervisor ,
8383 test_lists_subtraction ,
84- test_os
84+ test_os ,
85+ test_file
8586 ].
8687
8788get_networking_tests (OTPVersion ) when
You can’t perform that action at this time.
0 commit comments