 Code.require_file("test_helper.exs", __DIR__)
+
+# This is to temporarily test some inconsistencies in
+# the error ArgumentError messages
+# https://github.com/erlang/otp/issues/5440
+# TODO: once fixed in OTP and that minimum version is required,
+# please remove MyArgumentError and replace the calls to:
+# - MyArgumentError with ArgumentError
+# - MyArgumentError.culprit() with Atom.to_string("Foo")
+defmodule MyArgumentError do
+  defexception message: "argument error"
+
+  @impl true
+  def message(_) do
+    """
+    errors were found at the given arguments:
+
+      * 1st argument: not an atom
+    """
+  end
+
+  def culprit() do
+    raise = fn -> raise(MyArgumentError) end
+    raise.()
+  end
+end
 
 defmodule Inspect.AtomTest do
   use ExUnit.Case, async: true

    else
      _ -> flunk("expected failure")
    end
  end

  test "exception" do


  test "unsafely inspect bad implementation" do
    exception_message = ~s'''
    got MyArgumentError with message:

        """
        errors were found at the given arguments:
