Skip to content

Commit 865ed59

Browse files
committed
Add null bytes to BLOB test data
Update test_scalar_function_blob_return_type to use \x00 (null bytes) in test data, similar to test_append_blob pattern.
1 parent 188871d commit 865ed59

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/duckdb_test/scalar_function_test.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ def test_scalar_function_varchar_return_type # rubocop:disable Metrics/MethodLen
235235
def test_scalar_function_blob_return_type # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
236236
@con.execute('SET threads=1')
237237
@con.execute('CREATE TABLE test_table (data BLOB)')
238-
@con.execute("INSERT INTO test_table VALUES ('\\x01\\x02\\x03'::BLOB), ('\\xAA\\xBB\\xCC'::BLOB)")
238+
@con.execute("INSERT INTO test_table VALUES ('\\x00\\x01\\x02\\x03'::BLOB), ('\\x00\\xAA\\xBB\\xCC'::BLOB)")
239239

240240
sf = DuckDB::ScalarFunction.new
241241
sf.name = 'add_prefix'
@@ -248,8 +248,8 @@ def test_scalar_function_blob_return_type # rubocop:disable Metrics/AbcSize, Met
248248
rows = result.to_a
249249

250250
assert_equal 2, rows.size
251-
assert_equal "\xFF\x01\x02\x03".b, rows[0][0]
252-
assert_equal "\xFF\xAA\xBB\xCC".b, rows[1][0]
251+
assert_equal "\xFF\x00\x01\x02\x03".b, rows[0][0]
252+
assert_equal "\xFF\x00\xAA\xBB\xCC".b, rows[1][0]
253253
end
254254
end
255255
end

0 commit comments

Comments
 (0)