Skip to content

Commit

Permalink
chore: remove leftovers of unknown fields discarding support
Browse files Browse the repository at this point in the history
  • Loading branch information
ahamez committed Feb 27, 2025
1 parent e8759d6 commit 503b2c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 19 deletions.
3 changes: 1 addition & 2 deletions lib/mix/tasks/protox/generate.ex
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ defmodule Mix.Tasks.Protox.Generate do
output_path: :string,
include_path: :keep,
namespace: :string,
multiple_files: :boolean,
generate: :string
multiple_files: :boolean
]

@impl Mix.Task
Expand Down
20 changes: 3 additions & 17 deletions test/code_generation_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -20,34 +20,20 @@ defmodule Protox.CodeGenerationTest do
{:ok, %{code_generation_path: code_generation_path, protox_path: File.cwd!()}}
end

test "Generate single file, with unknown fields", %{
test "Generate single file", %{
code_generation_path: path,
protox_path: protox_path
} do
launch(path, protox_path, "single_with_unknown_fields.ex", [])
launch(path, protox_path, "single.ex", [])
end

test "Generate single file, without unknown fields", %{
code_generation_path: path,
protox_path: protox_path
} do
launch(path, protox_path, "single_without_unknown_fields.ex", ["--generate=none"])
end

test "Generate multiple files, with unknown fields", %{
test "Generate multiple files", %{
code_generation_path: path,
protox_path: protox_path
} do
launch(path, protox_path, ".", ["--multiple-files"])
end

test "Generate multiple files, without unknown fields", %{
code_generation_path: path,
protox_path: protox_path
} do
launch(path, protox_path, ".", ["--multiple-files", "--generate=none"])
end

test "Generate single file, with namespace", %{
code_generation_path: path,
protox_path: protox_path
Expand Down

0 comments on commit 503b2c8

Please sign in to comment.