From 5f0e81cd2351309b8fa0ebd6eb39a21607c2cf96 Mon Sep 17 00:00:00 2001 From: Daniel Mewes Date: Mon, 19 May 2014 16:56:03 -0700 Subject: [PATCH] Improved #2399 regression test. --- test/rql_test/src/regression/2399.yaml | 42 +++++++++++++++++++------- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/test/rql_test/src/regression/2399.yaml b/test/rql_test/src/regression/2399.yaml index 5152e273fec..06ca674f749 100644 --- a/test/rql_test/src/regression/2399.yaml +++ b/test/rql_test/src/regression/2399.yaml @@ -6,26 +6,46 @@ tests: def: t = r.db('test').table('t2399') - rb: t.insert({}) - - rb: t.update({:a => {:b => r.literal({})}}) + - rb: t.without('id').coerce_to("ARRAY") + ot: ([{:a => {:b => {}}}]) + - rb: t.delete() - - rb: t.coerce_to("ARRAY").count() - ot: (1) + - rb: t.insert({}) + - rb: t.update({:a => {:b => r.literal()}}) + - rb: t.without('id').coerce_to("ARRAY") + ot: ([{:a => {}}]) + - rb: t.delete() + - rb: t.insert({}) - rb: t.update({:a => {:b => {:c => {:d => r.literal({})}}}}) + - rb: t.without('id').coerce_to("ARRAY") + ot: ([{:a => {:b => {:c => {:d => {}}}}}]) + - rb: t.delete() - - rb: t.coerce_to("ARRAY").count() - ot: (1) - + - rb: t.insert({}) - rb: t.update({:a => {:b => [[[{:c => r.literal({})}]]]}}) + - rb: t.without('id').coerce_to("ARRAY") + ot: ([{:a => {:b => [[[{:c => {}}]]]}}]) + - rb: t.delete() - - rb: t.coerce_to("ARRAY").count() - ot: (1) + - rb: t.insert({}) + - rb: t.update({:a => {:b => [r.literal()]}}) + - rb: t.without('id').coerce_to("ARRAY") + ot: ([{:a => {:b => []}}]) + - rb: t.delete() - - rb: t.update({:a => [{:b => r.literal({})}]}) + - rb: t.insert({}) + - rb: t.update({:a => {:b => {:a => 'A', :b => 'B', :c => 'C', :cc => r.literal(), :d => 'D'}}}) + - rb: t.without('id').coerce_to("ARRAY") + ot: ([{:a => {:b => {:a => 'A', :b => 'B', :c => 'C', :d => 'D'}}}]) + - rb: t.delete() - - rb: t.coerce_to("ARRAY").count() - ot: (1) + - rb: t.insert({}) + - rb: t.update({:a => {:b => {:a => 'A', :b => 'B', :c => 'C', :cc => r.literal('CC'), :d => 'D'}}}) + - rb: t.without('id').coerce_to("ARRAY") + ot: ([{:a => {:b => {:a => 'A', :b => 'B', :c => 'C', :cc => 'CC', :d => 'D'}}}]) + - rb: t.delete() - rb: r.db('test').table_drop('t2399') ot: ({'dropped':1})