From 55f7432b303c70f2f0ee6fa4659f6a366292dc3e Mon Sep 17 00:00:00 2001 From: nagachika Date: Sat, 9 May 2026 15:26:07 +0900 Subject: Bump pstore version to v0.2.1. [Bug #21880] --- test/test_pstore.rb | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/test_pstore.rb b/test/test_pstore.rb index 7dfbdca367..4a65e4fec9 100644 --- a/test/test_pstore.rb +++ b/test/test_pstore.rb @@ -66,6 +66,16 @@ class PStoreTest < Test::Unit::TestCase end end + def test_data_should_be_stored_correctly_when_in_ultra_safe_mode + @pstore.ultra_safe = true + @pstore.transaction do + @pstore[:foo] = "bar" + end + @pstore.transaction(true) do + assert_equal "bar", @pstore[:foo] + end + end + def test_writing_inside_readonly_transaction_raises_error assert_raise(PStore::Error) do @pstore.transaction(true) do @@ -133,7 +143,8 @@ class PStoreTest < Test::Unit::TestCase def test_pstore_files_are_accessed_as_binary_files bug5311 = '[ruby-core:39503]' n = 128 - assert_in_out_err(["-Eutf-8:utf-8", "-rpstore", "-", @pstore_file], <<-SRC, [bug5311], [], bug5311, timeout: 30) + top_dir = File.expand_path('../lib', __dir__) + assert_in_out_err(["-Eutf-8:utf-8", "-I#{top_dir}", "-rpstore", "-", @pstore_file], <<-SRC, [bug5311], [], bug5311, timeout: 30) @pstore = PStore.new(ARGV[0]) (1..#{n}).each do |i| @pstore.transaction {@pstore["Key\#{i}"] = "value \#{i}"} -- cgit v1.2.3