Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lib/mix/test/mix/tasks/compile.elixir_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ defmodule Mix.Tasks.Compile.ElixirTest do
Mix.shell().flush
purge([A, B])

future = {{2020, 1, 1}, {0, 0, 0}}
future = {{2038, 1, 1}, {0, 0, 0}}
File.touch!("lib/a.ex", future)
Mix.Tasks.Compile.Elixir.run(["--verbose"])

Expand Down Expand Up @@ -176,7 +176,7 @@ defmodule Mix.Tasks.Compile.ElixirTest do
Mix.shell().flush
purge([A, B])

future = {{2020, 1, 1}, {0, 0, 0}}
future = {{2038, 1, 1}, {0, 0, 0}}
File.touch!("lib/b.ex", future)
Mix.Tasks.Compile.Elixir.run(["--verbose"])

Expand Down Expand Up @@ -225,7 +225,7 @@ defmodule Mix.Tasks.Compile.ElixirTest do
purge([A, B])

# Update local existing resource
File.touch!("lib/a.eex", {{2030, 1, 1}, {0, 0, 0}})
File.touch!("lib/a.eex", {{2038, 1, 1}, {0, 0, 0}})
assert Mix.Tasks.Compile.Elixir.run(["--verbose"]) == {:ok, []}
assert_received {:mix_shell, :info, ["Compiled lib/a.ex"]}
refute_received {:mix_shell, :info, ["Compiled lib/b.ex"]}
Expand All @@ -237,7 +237,7 @@ defmodule Mix.Tasks.Compile.ElixirTest do
purge([A, B])

# Update external existing resource
File.touch!(tmp, {{2030, 1, 1}, {0, 0, 0}})
File.touch!(tmp, {{2038, 1, 1}, {0, 0, 0}})
assert Mix.Tasks.Compile.Elixir.run(["--verbose"]) == {:ok, []}
assert_received {:mix_shell, :info, ["Compiled lib/a.ex"]}
refute_received {:mix_shell, :info, ["Compiled lib/b.ex"]}
Expand Down Expand Up @@ -327,7 +327,7 @@ defmodule Mix.Tasks.Compile.ElixirTest do
assert_received {:mix_shell, :info, ["Compiled lib/b.ex"]}
purge([A, B])

future = {{2020, 1, 1}, {0, 0, 0}}
future = {{2038, 1, 1}, {0, 0, 0}}
File.touch!("lib/a.ex", future)

assert Mix.Tasks.Compile.Elixir.run(["--verbose"]) == {:ok, []}
Expand Down Expand Up @@ -432,7 +432,7 @@ defmodule Mix.Tasks.Compile.ElixirTest do
Mix.shell().flush
purge([A, B])

future = {{2020, 1, 1}, {0, 0, 0}}
future = {{2038, 1, 1}, {0, 0, 0}}
File.touch!("lib/a.ex", future)
Mix.Tasks.Compile.Elixir.run(["--verbose"])

Expand Down
2 changes: 1 addition & 1 deletion lib/mix/test/mix/tasks/compile.xref_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ defmodule Mix.Tasks.Compile.XrefTest do
end)

[manifest] = Mix.Tasks.Compile.Elixir.manifests()
future = {{2020, 1, 1}, {0, 0, 0}}
future = {{2038, 1, 1}, {0, 0, 0}}
File.touch!(manifest, future)

Mix.Task.reenable("xref")
Expand Down
4 changes: 2 additions & 2 deletions lib/mix/test/mix/tasks/format_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ defmodule Mix.Tasks.FormatTest do
[inputs: "a.ex"]
""")

File.touch!("lib/sub/.formatter.exs", {{2030, 1, 1}, {0, 0, 0}})
File.touch!("lib/sub/.formatter.exs", {{2038, 1, 1}, {0, 0, 0}})
Mix.Tasks.Format.run([])

assert File.read!("lib/sub/a.ex") == """
Expand All @@ -388,7 +388,7 @@ defmodule Mix.Tasks.FormatTest do
other_fun :baz
""")

File.touch!("lib/extra/.formatter.exs", {{2030, 1, 1}, {0, 0, 0}})
File.touch!("lib/extra/.formatter.exs", {{2038, 1, 1}, {0, 0, 0}})
Mix.Tasks.Format.run([])

formatter_opts = Mix.Tasks.Format.formatter_opts_for_file("lib/extra/a.ex")
Expand Down
2 changes: 1 addition & 1 deletion lib/mix/test/mix/tasks/loadconfig_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ defmodule Mix.Tasks.LoadconfigTest do
assert Mix.Project.config_mtime() > mtime

# Touching it should not have any deadlocks
File.touch!(config, {{2030, 1, 1}, {0, 0, 0}})
File.touch!(config, {{2038, 1, 1}, {0, 0, 0}})
Mix.Task.run("loadconfig", [config])
assert config in Mix.Project.config_files()
assert Mix.Project.config_mtime() > mtime
Expand Down
4 changes: 2 additions & 2 deletions lib/mix/test/mix/utils_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ defmodule Mix.UtilsTest do
end

test "extract stale" do
# 2030-01-01 00:00:00
time = 1_893_456_000
# 2038-01-01 00:00:00
time = 2_145_916_800
assert Mix.Utils.extract_stale([__ENV__.file], [time]) == []

# 2000-01-01 00:00:00
Expand Down