diff --git a/e2e/binary/romanize/BUILD.bazel b/e2e/binary/romanize/BUILD.bazel index 2590081500a662366c7ddb04c848e1c7a68972f2..4f154e1b97a527591ad2f9f24671fd4dda449513 100644 --- a/e2e/binary/romanize/BUILD.bazel +++ b/e2e/binary/romanize/BUILD.bazel @@ -1,11 +1,21 @@ -load("@bazel_skylib//rules:build_test.bzl", "build_test") +load("@rules_python_pytest//python_pytest:defs.bzl", "py_pytest_test") -# TODO: write an _actual_ test for `romanize` +py_pytest_test( + name = "pytest", + size = "small", + srcs = ["romanize.py"], + data = [ + "@ape//ape:romanize", + ], + deps = [ + "//binary:pytest", + ], +) -build_test( +test_suite( name = "romanize", - size = "small", - tags = ["stub"], - targets = ["@ape//ape:romanize"], + tests = [ + "pytest", + ], visibility = ["//:__subpackages__"], ) diff --git a/e2e/binary/romanize/romanize.py b/e2e/binary/romanize/romanize.py new file mode 100644 index 0000000000000000000000000000000000000000..3798f08b16a6b670cbdb861521e02a72d385a77c --- /dev/null +++ b/e2e/binary/romanize/romanize.py @@ -0,0 +1,15 @@ +from __future__ import annotations + +from subprocess import run + +from binary.tool import Tool + + +def test_romanize(tool: Tool) -> None: + binary = tool("romanize") + + cmd = (binary) + stdin = 'Mjød' + result = run(cmd, check=True, timeout=30, input=stdin, capture_output=True, text=True) + + assert result.stdout == 'MJOED'