File: deprecation_test.exs

package info (click to toggle)
elixir-earmark-parser 1.4.44-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,148 kB
  • sloc: makefile: 9
file content (39 lines) | stat: -rw-r--r-- 1,036 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
defmodule Test.Functional.Scanner.DeprecationTest do
  use ExUnit.Case

  import Support.Helpers, only: [as_ast: 2]

  describe "Deprecations to be removed in 1.5.0" do
    test "pedantic" do
      markdown = ""
      ast = []

      messages = [
        {:deprecated, 0, "The pedantic option has no effect anymore and will be removed in EarmarkParser 1.5"}
      ]

      assert as_ast(markdown, pedantic: true) == {:ok, ast, messages}
    end

    test "smartypants" do
      markdown = ""
      ast = []

      messages = [
        {:deprecated, 0, "The smartypants option has no effect anymore and will be removed in EarmarkParser 1.5"}
      ]

      assert as_ast(markdown, smartypants: true) == {:ok, ast, messages}
    end

    test "timeout" do
      markdown = ""
      ast = []
      messages = [{:deprecated, 0, "The timeout option has no effect anymore and will be removed in EarmarkParser 1.5"}]

      assert as_ast(markdown, timeout: 42) == {:ok, ast, messages}
    end
  end
end

#  SPDX-License-Identifier: Apache-2.0