diff options
author | Hans Bolinder <[email protected]> | 2013-03-10 14:03:14 +0100 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2013-03-18 16:26:34 +0100 |
commit | 96acef90bb5362c9c8be0d6b3bcc1bb4ebf60262 (patch) | |
tree | a6d863a6e3211e294729ae7ed84e7710659a05b7 /lib/stdlib/test/io_proto_SUITE.erl | |
parent | 2bcc458293f73c741ab2046f02a3e4c9bc0d57a1 (diff) | |
download | otp-96acef90bb5362c9c8be0d6b3bcc1bb4ebf60262.tar.gz otp-96acef90bb5362c9c8be0d6b3bcc1bb4ebf60262.tar.bz2 otp-96acef90bb5362c9c8be0d6b3bcc1bb4ebf60262.zip |
Fix a test case bug
io_proto_SUITE: node names containing some '-' did not work.
Diffstat (limited to 'lib/stdlib/test/io_proto_SUITE.erl')
-rw-r--r-- | lib/stdlib/test/io_proto_SUITE.erl | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/stdlib/test/io_proto_SUITE.erl b/lib/stdlib/test/io_proto_SUITE.erl index 4ca8680fc9..e16ba55481 100644 --- a/lib/stdlib/test/io_proto_SUITE.erl +++ b/lib/stdlib/test/io_proto_SUITE.erl @@ -935,8 +935,8 @@ bc_with_r12_gl_1(_Config,Machine) -> TestDataLine1BinUtf = unicode:characters_to_binary(TestDataLine1), TestDataLine1BinLatin = list_to_binary(TestDataLine1), - N2List = create_nodename(), - MyNodeList = atom_to_list(node()), + {ok,N2List} = create_nodename(), + MyNodeList = atom2list(node()), register(io_proto_suite,self()), AM1 = spawn(?MODULE,Machine, [MyNodeList, "io_proto_suite", N2List]), @@ -1182,8 +1182,8 @@ read_modes_gl_1(_Config,Machine) -> TestDataLine1BinUtf = unicode:characters_to_binary(TestDataLine1), TestDataLine1BinLatin = list_to_binary(TestDataLine1), - N2List = create_nodename(), - MyNodeList = atom_to_list(node()), + {ok,N2List} = create_nodename(), + MyNodeList = atom2list(node()), register(io_proto_suite,self()), AM1 = spawn(?MODULE,Machine, [MyNodeList, "io_proto_suite", N2List]), @@ -1609,7 +1609,7 @@ create_nodename(X) -> case file:read_file_info(filename:join(["/tmp",NN])) of {error,enoent} -> Host = lists:nth(2,string:tokens(atom_to_list(node()),"@")), - NN++"@"++Host; + {ok,NN++"@"++Host}; _ -> create_nodename(X+1) end. @@ -1925,6 +1925,9 @@ from(H, [H | T]) -> T; from(H, [_ | T]) -> from(H, T); from(_, []) -> []. +atom2list(A) -> + lists:flatten(io_lib:format("~w", [A])). + chomp([]) -> []; chomp([$\n]) -> |