diff options
| author | nagachika <nagachika@ruby-lang.org> | 2026-05-09 15:26:07 +0900 |
|---|---|---|
| committer | nagachika <nagachika@ruby-lang.org> | 2026-05-09 15:26:33 +0900 |
| commit | 55f7432b303c70f2f0ee6fa4659f6a366292dc3e (patch) | |
| tree | 0d6f0a8d269adcbb5153c1dc0fb85af209416071 /test | |
| parent | de535e907196bbd1198dbd69523f4eef18bdd133 (diff) | |
Bump pstore version to v0.2.1. [Bug #21880]ruby_3_4
Diffstat (limited to 'test')
| -rw-r--r-- | test/test_pstore.rb | 13 |
1 files changed, 12 insertions, 1 deletions
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}"} |
