Skip to content

Commit 9277413

Browse files
eksperimentallexmag
authored andcommitted
Add underscore in file names, and atoms (#5478)
1 parent 1b664dd commit 9277413

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

lib/elixir/test/elixir/code_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ defmodule CodeTest do
107107
end
108108

109109
test "string to quoted existing atoms only" do
110-
assert :badarg = catch_error(Code.string_to_quoted!(":thereisnosuchatom", existing_atoms_only: true))
110+
assert :badarg = catch_error(Code.string_to_quoted!(":there_is_no_such_atom", existing_atoms_only: true))
111111
end
112112

113113
test "string_to_quoted!" do

lib/elixir/test/elixir/exception_test.exs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,18 +73,18 @@ defmodule ExceptionTest do
7373

7474
test "format_stacktrace from file" do
7575
assert_raise ArgumentError, fn ->
76-
Code.eval_string("def foo do end", [], file: "myfile")
76+
Code.eval_string("def foo do end", [], file: "my_file")
7777
end
7878

79-
assert Exception.format_stacktrace(System.stacktrace) =~ "myfile:1: (file)"
79+
assert Exception.format_stacktrace(System.stacktrace) =~ "my_file:1: (file)"
8080
end
8181

8282
test "format_stacktrace from module" do
8383
assert_raise ArgumentError, fn ->
84-
Code.eval_string("defmodule FmtStack do raise ArgumentError, ~s(oops) end", [], file: "myfile")
84+
Code.eval_string("defmodule FmtStack do raise ArgumentError, ~s(oops) end", [], file: "my_file")
8585
end
8686

87-
assert Exception.format_stacktrace(System.stacktrace) =~ "myfile:1: (module)"
87+
assert Exception.format_stacktrace(System.stacktrace) =~ "my_file:1: (module)"
8888
end
8989

9090
test "format_stacktrace_entry with no file or line" do

lib/elixir/test/elixir/uri_test.exs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -103,25 +103,25 @@ defmodule URITest do
103103
end
104104

105105
test "parse FTP" do
106-
assert %URI{scheme: "ftp", host: "private.ftp-servers.example.com",
107-
userinfo: "user001:secretpassword", authority: "user001:secretpassword@private.ftp-servers.example.com",
108-
path: "/mydirectory/myfile.txt", query: nil, fragment: nil,
106+
assert %URI{scheme: "ftp", host: "private.ftp-server.example.com",
107+
userinfo: "user001:password", authority: "user001:password@private.ftp-server.example.com",
108+
path: "/my_directory/my_file.txt", query: nil, fragment: nil,
109109
port: 21} ==
110-
URI.parse("ftp://user001:secretpassword@private.ftp-servers.example.com/mydirectory/myfile.txt")
110+
URI.parse("ftp://user001:password@private.ftp-server.example.com/my_directory/my_file.txt")
111111
end
112112

113113
test "parse SFTP" do
114-
assert %URI{scheme: "sftp", host: "private.ftp-servers.example.com",
115-
userinfo: "user001:secretpassword", authority: "user001:secretpassword@private.ftp-servers.example.com",
116-
path: "/mydirectory/myfile.txt", query: nil, fragment: nil, port: 22} ==
117-
URI.parse("sftp://user001:secretpassword@private.ftp-servers.example.com/mydirectory/myfile.txt")
114+
assert %URI{scheme: "sftp", host: "private.ftp-server.example.com",
115+
userinfo: "user001:password", authority: "user001:password@private.ftp-server.example.com",
116+
path: "/my_directory/my_file.txt", query: nil, fragment: nil, port: 22} ==
117+
URI.parse("sftp://user001:password@private.ftp-server.example.com/my_directory/my_file.txt")
118118
end
119119

120120
test "parse TFTP" do
121-
assert %URI{scheme: "tftp", host: "private.ftp-servers.example.com",
122-
userinfo: "user001:secretpassword", authority: "user001:secretpassword@private.ftp-servers.example.com",
123-
path: "/mydirectory/myfile.txt", query: nil, fragment: nil, port: 69} ==
124-
URI.parse("tftp://user001:secretpassword@private.ftp-servers.example.com/mydirectory/myfile.txt")
121+
assert %URI{scheme: "tftp", host: "private.ftp-server.example.com",
122+
userinfo: "user001:password", authority: "user001:password@private.ftp-server.example.com",
123+
path: "/my_directory/my_file.txt", query: nil, fragment: nil, port: 69} ==
124+
URI.parse("tftp://user001:password@private.ftp-server.example.com/my_directory/my_file.txt")
125125
end
126126

127127

0 commit comments

Comments
 (0)