diff options
author | Dan Gudmundsson <[email protected]> | 2017-10-20 15:03:05 +0200 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2017-10-20 15:11:44 +0200 |
commit | cdb1ca9e12901b95aadffff08124976ce9a27033 (patch) | |
tree | 026b48c9ace710f6c788e08660e189a270e4cc72 /lib/common_test/src | |
parent | 62db6a63625ef67d7474da1efc8d4f65bfd8c251 (diff) | |
download | otp-cdb1ca9e12901b95aadffff08124976ce9a27033.tar.gz otp-cdb1ca9e12901b95aadffff08124976ce9a27033.tar.bz2 otp-cdb1ca9e12901b95aadffff08124976ce9a27033.zip |
Fix lexemes conversion
Diffstat (limited to 'lib/common_test/src')
-rw-r--r-- | lib/common_test/src/ct_config.erl | 4 | ||||
-rw-r--r-- | lib/common_test/src/ct_config_plain.erl | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/common_test/src/ct_config.erl b/lib/common_test/src/ct_config.erl index b3f983dd46..b9d2155d58 100644 --- a/lib/common_test/src/ct_config.erl +++ b/lib/common_test/src/ct_config.erl @@ -659,7 +659,7 @@ decrypt_config_file(EncryptFileName, TargetFileName, {key,Key}) -> get_crypt_key_from_file(File) -> case file:read_file(File) of {ok,Bin} -> - case catch string:lexemes(binary_to_list(Bin), [$\n,$\r]) of + case catch string:lexemes(binary_to_list(Bin), [$\n, [$\r,$\n]]) of [Key] -> Key; _ -> @@ -693,7 +693,7 @@ get_crypt_key_from_file() -> noent -> Result; _ -> - case catch string:lexemes(binary_to_list(Result), [$\n,$\r]) of + case catch string:lexemes(binary_to_list(Result), [$\n, [$\r,$\n]]) of [Key] -> io:format("~nCrypt key file: ~ts~n", [FullName]), Key; diff --git a/lib/common_test/src/ct_config_plain.erl b/lib/common_test/src/ct_config_plain.erl index e77381d7cf..d525019f7b 100644 --- a/lib/common_test/src/ct_config_plain.erl +++ b/lib/common_test/src/ct_config_plain.erl @@ -106,7 +106,7 @@ read_config_terms1({done,{eof,EL},_}, L, _, _) -> read_config_terms1({done,{error,Info,EL},_}, L, _, _) -> {error,{Info,{L,EL}}}; read_config_terms1({more,_}, L, Terms, Rest) -> - case string:lexemes(Rest, [$\n,$\r,$\t]) of + case string:lexemes(Rest, [$\n,[$\r,$\n],$\t]) of [] -> lists:reverse(Terms); _ -> |