@@ -33,9 +33,9 @@ defmodule Gettext.ExtractorTest do
3333 Extractor . merge_pot_files ( extracted_po_structs , [ paths . tomerge , paths . ignored ] , [ ] )
3434
3535 # Unchanged files are not returned
36- assert List . keyfind ( structs , paths . ignored , 0 ) == nil
36+ assert { _path , :unchanged } = List . keyfind ( structs , paths . ignored , 0 )
3737
38- { _ , contents } = List . keyfind ( structs , paths . tomerge , 0 )
38+ assert { _ , { :changed , contents } } = List . keyfind ( structs , paths . tomerge , 0 )
3939
4040 assert IO . iodata_to_binary ( contents ) == """
4141 msgid "foo"
@@ -45,7 +45,7 @@ defmodule Gettext.ExtractorTest do
4545 msgstr ""
4646 """
4747
48- { _ , contents } = List . keyfind ( structs , paths . new , 0 )
48+ assert { _ , { :changed , contents } } = List . keyfind ( structs , paths . new , 0 )
4949 contents = IO . iodata_to_binary ( contents )
5050
5151 assert contents =~ """
@@ -385,7 +385,11 @@ defmodule Gettext.ExtractorTest do
385385 assert [ ] = Extractor . pot_files ( :unknown , [ ] )
386386
387387 pot_files = Extractor . pot_files ( :test_application , [ ] )
388- dumped = Enum . map ( pot_files , fn { k , v } -> { k , IO . iodata_to_binary ( v ) } end )
388+
389+ dumped =
390+ pot_files
391+ |> Enum . reject ( & match? ( { _path , :unchanged } , & 1 ) )
392+ |> Enum . map ( fn { k , { :changed , v } } -> { k , IO . iodata_to_binary ( v ) } end )
389393
390394 # We check that dumped strings end with the `expected` string because
391395 # there's the informative comment at the start of each dumped string.
0 commit comments