Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add failing :binary test #183

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions test/ecto/integration/clickhouse_binary_type_test.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
defmodule Ecto.Integration.BinaryTypeTest do
use Ecto.Integration.Case, async: true
import Ecto.Query
alias Ecto.Integration.TestRepo

test "it works" do

Check failure on line 6 in test/ecto/integration/clickhouse_binary_type_test.exs

View workflow job for this annotation

GitHub Actions / test (1.14, 25, latest, UTC)

test it works (Ecto.Integration.BinaryTypeTest)

Check failure on line 6 in test/ecto/integration/clickhouse_binary_type_test.exs

View workflow job for this annotation

GitHub Actions / test (1.14, 26, latest, UTC)

test it works (Ecto.Integration.BinaryTypeTest)

Check failure on line 6 in test/ecto/integration/clickhouse_binary_type_test.exs

View workflow job for this annotation

GitHub Actions / test (1.15, 25, latest, UTC)

test it works (Ecto.Integration.BinaryTypeTest)

Check failure on line 6 in test/ecto/integration/clickhouse_binary_type_test.exs

View workflow job for this annotation

GitHub Actions / test (1.15, 26, latest, UTC)

test it works (Ecto.Integration.BinaryTypeTest)

Check failure on line 6 in test/ecto/integration/clickhouse_binary_type_test.exs

View workflow job for this annotation

GitHub Actions / test (1.16, 25, latest, UTC)

test it works (Ecto.Integration.BinaryTypeTest)

Check failure on line 6 in test/ecto/integration/clickhouse_binary_type_test.exs

View workflow job for this annotation

GitHub Actions / test (1.16, 26, latest, UTC)

test it works (Ecto.Integration.BinaryTypeTest)

Check failure on line 6 in test/ecto/integration/clickhouse_binary_type_test.exs

View workflow job for this annotation

GitHub Actions / test (1.17, 25, latest, UTC)

test it works (Ecto.Integration.BinaryTypeTest)

Check failure on line 6 in test/ecto/integration/clickhouse_binary_type_test.exs

View workflow job for this annotation

GitHub Actions / test (1.17, 26, latest, UTC)

test it works (Ecto.Integration.BinaryTypeTest)

Check failure on line 6 in test/ecto/integration/clickhouse_binary_type_test.exs

View workflow job for this annotation

GitHub Actions / test (1.17, 27, latest, UTC)

test it works (Ecto.Integration.BinaryTypeTest)

Check failure on line 6 in test/ecto/integration/clickhouse_binary_type_test.exs

View workflow job for this annotation

GitHub Actions / test (1.17, 27, latest, Europe/Berlin)

test it works (Ecto.Integration.BinaryTypeTest)

Check failure on line 6 in test/ecto/integration/clickhouse_binary_type_test.exs

View workflow job for this annotation

GitHub Actions / test (1.16.0, 26.2.1, 24.3.3.102-alpine, UTC)

test it works (Ecto.Integration.BinaryTypeTest)
TestRepo.query!("CREATE TABLE binary_test(bin String) ENGINE = Memory")
on_exit(fn -> TestRepo.query!("DROP TABLE binary_test") end)

bin = "\x61\xF0\x80\x80\x80b"
TestRepo.query!(["INSERT INTO binary_test(bin) FORMAT RowBinary\n", byte_size(bin) | bin])

assert TestRepo.one(
from t in "binary_test",
select: %{
default: t.bin,
type_binary: type(t.bin, :binary),
length: fragment("length(?)", t.bin)
}
) == %{
default: _utf8_escaped = "a�b",
type_binary: bin,
length: _original_length = length(6)
}
end
end
Loading