From d2ca06e0832b8df62b1a6323f5b6a12eba0311b3 Mon Sep 17 00:00:00 2001 From: Wojtek Mach Date: Mon, 25 Nov 2024 10:08:45 +0100 Subject: [PATCH] Revert adding new fixture --- .gitignore | 2 -- test/fixtures/single/lib/single.ex | 10 ---------- test/fixtures/single/mix.exs | 15 --------------- test/mix/tasks/docs_test.exs | 4 ++++ test/test_helper.exs | 17 ----------------- 5 files changed, 4 insertions(+), 44 deletions(-) delete mode 100644 test/fixtures/single/lib/single.ex delete mode 100644 test/fixtures/single/mix.exs diff --git a/.gitignore b/.gitignore index c7b87c7b8..1a2bf195c 100644 --- a/.gitignore +++ b/.gitignore @@ -24,8 +24,6 @@ ex_doc-*.tar node_modules/ /test/fixtures/umbrella/_build/ -/test/fixtures/single/_build/ -/test/fixtures/single/doc/ /test/tmp/ /tmp/ /npm-debug.log diff --git a/test/fixtures/single/lib/single.ex b/test/fixtures/single/lib/single.ex deleted file mode 100644 index 65cb4059e..000000000 --- a/test/fixtures/single/lib/single.ex +++ /dev/null @@ -1,10 +0,0 @@ -defmodule Single do - @moduledoc """ - moduledoc `Single.bar/0` - """ - - @doc """ - doc `Single.bar/0` - """ - def foo(), do: :foo -end diff --git a/test/fixtures/single/mix.exs b/test/fixtures/single/mix.exs deleted file mode 100644 index 15c2510e8..000000000 --- a/test/fixtures/single/mix.exs +++ /dev/null @@ -1,15 +0,0 @@ -defmodule Single.MixProject do - use Mix.Project - - def project do - [ - app: :single, - version: "0.1.0", - elixir: "~> 1.12", - start_permanent: Mix.env() == :prod, - deps: [] - ] - end - - def application, do: [extra_applications: [:logger]] -end diff --git a/test/mix/tasks/docs_test.exs b/test/mix/tasks/docs_test.exs index b7951bf69..edc4ac12a 100644 --- a/test/mix/tasks/docs_test.exs +++ b/test/mix/tasks/docs_test.exs @@ -410,6 +410,8 @@ defmodule Mix.Tasks.DocsTest do end) end + # TODO: + @tag :skip test "accepts warnings_as_errors in :warnings_as_errors", context do assert [ {"ex_doc", "dev", @@ -435,6 +437,8 @@ defmodule Mix.Tasks.DocsTest do ] = run(context, [], app: :ex_doc, docs: [warnings_as_errors: false]) end + # TODO: + @tag :skip @tag :tmp_dir test "exits with 1 due to warnings, with flag --warnings_as_errors", context do Utils.unset_warned() diff --git a/test/test_helper.exs b/test/test_helper.exs index 62e1ab099..a555ba53f 100644 --- a/test/test_helper.exs +++ b/test/test_helper.exs @@ -11,9 +11,7 @@ ExUnit.start(exclude: Enum.filter(exclude, &elem(&1, 1))) # Prepare module fixtures File.rm_rf!("test/tmp") -File.rm_rf!("test/fixtures/single/_build/") File.mkdir_p!("test/tmp/beam") -File.mkdir_p!("test/fixtures/single/_build/test/lib/single/ebin") Code.prepend_path("test/tmp/beam") # Compile module fixtures @@ -21,21 +19,6 @@ Code.prepend_path("test/tmp/beam") |> Path.wildcard() |> Kernel.ParallelCompiler.compile_to_path("test/tmp/beam") -# Compile fixture :single app module -"test/fixtures/single/lib/*.ex" -|> Path.wildcard() -|> Kernel.ParallelCompiler.compile_to_path("test/fixtures/single/_build/test/lib/single/ebin") - -File.write!("test/fixtures/single/_build/test/lib/single/ebin/single.app", ~S""" -{application,single, - [{optional_applications,[]}, - {applications,[kernel,stdlib,elixir,logger]}, - {description,"single"}, - {modules,['Elixir.Single']}, - {registered,[]}, - {vsn,"0.1.0"}]}. -""") - defmodule TestHelper do def elixirc(context, filename \\ "nofile", code) do dir = context.tmp_dir