diff options
author | Rickard Green <[email protected]> | 2017-10-12 16:30:38 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2017-10-12 16:30:38 +0200 |
commit | 55693961fbb6371d2c3ec0a426f30b8acace6ed1 (patch) | |
tree | 7debd0d509349e26508c211763f1865652c623ef /lib/stdlib/test | |
parent | 4900f9886cc80ecf34f9590829878da937e75422 (diff) | |
parent | f28539265d753bbaa473cb488e951bfe47304a01 (diff) | |
download | otp-55693961fbb6371d2c3ec0a426f30b8acace6ed1.tar.gz otp-55693961fbb6371d2c3ec0a426f30b8acace6ed1.tar.bz2 otp-55693961fbb6371d2c3ec0a426f30b8acace6ed1.zip |
Merge branch 'maint'
* maint:
Revert "Merge branch 'rickard/null-char-filenames/ERL-370/OTP-14543' into maint"
Diffstat (limited to 'lib/stdlib/test')
-rw-r--r-- | lib/stdlib/test/filename_SUITE.erl | 57 |
1 files changed, 1 insertions, 56 deletions
diff --git a/lib/stdlib/test/filename_SUITE.erl b/lib/stdlib/test/filename_SUITE.erl index 4c82ec1c22..fc77593bb8 100644 --- a/lib/stdlib/test/filename_SUITE.erl +++ b/lib/stdlib/test/filename_SUITE.erl @@ -30,7 +30,6 @@ -export([pathtype_bin/1,rootname_bin/1,split_bin/1]). -export([t_basedir_api/1, t_basedir_xdg/1, t_basedir_windows/1]). -export([safe_relative_path/1]). --export([validate/1]). -include_lib("common_test/include/ct.hrl"). @@ -44,8 +43,7 @@ all() -> absname_bin, absname_bin_2, {group,p}, t_basedir_xdg, t_basedir_windows, - safe_relative_path, - validate]. + safe_relative_path]. groups() -> [{p, [parallel], @@ -1013,56 +1011,3 @@ basedir_xdg_def(Type,Home,Name) -> Dir <- ["/usr/local/share/","/usr/share/"]]; site_config -> [filename:join(["/etc/xdg",Name])] end. - -validate(Config) when is_list(Config) -> - true = filename:validate(blipp), - false = filename:validate('bli\0pp'), - false = filename:validate('blipp\0'), - true = filename:validate("blipp"), - false = filename:validate("bli"++[0]++"pp"), - false = filename:validate("blipp"++[0]), - true = filename:validate(["one ", blipp, "blopp"]), - false = filename:validate(["one ", 'bli\0pp', "blopp"]), - false = filename:validate(["one ", 'blipp\0', "blopp"]), - false = filename:validate(["one ", 'blipp', "blopp\0"]), - false = filename:validate([0]), - false = filename:validate([]), - false = filename:validate([[[]],[[[[],[[[[[[[[]]], '', [[[[[]]]]]]]]]]]]]]), - false = filename:validate([16#110000]), - false = filename:validate([16#110001]), - false = filename:validate([16#110000*2]), - case file:native_name_encoding() of - latin1 -> - true = filename:validate(lists:seq(1, 255)), - false = filename:validate([256]); - utf8 -> - true = filename:validate(lists:seq(1, 16#D7FF)), - true = filename:validate(lists:seq(16#E000, 16#FFFF)), - true = filename:validate([16#FFFF]), - case os:type() of - {win32, _} -> - false = filename:validate([16#10000]), - true = filename:validate(lists:seq(16#D800,16#DFFF)); - _ -> - true = filename:validate([16#10000]), - true = filename:validate([16#10FFFF]), - lists:foreach(fun (C) -> - false = filename:validate([C]) - end, - lists:seq(16#D800,16#DFFF)) - end - - end, - true = filename:validate(<<1,17,255>>), - false = filename:validate(<<1,0,17,255>>), - false = filename:validate(<<1,17,255,0>>), - false = filename:validate(<<>>), - lists:foreach(fun (N) -> - true = filename:validate(N) - end, - code:get_path()), - ok. - - - - |