test: ruby: simplify output comparison

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
This commit is contained in:
Felipe Contreras 2021-05-01 06:59:23 -05:00 committed by David Bremner
parent faf5511c3e
commit ac64de450a

View file

@ -20,22 +20,22 @@ test_ruby() {
}
test_begin_subtest "compare thread ids"
notmuch search --sort=oldest-first --output=threads tag:inbox | sed s/^thread:// > EXPECTED
notmuch search --sort=oldest-first --output=threads tag:inbox > EXPECTED
test_ruby <<"EOF"
q = db.query('tag:inbox')
q.sort = Notmuch::SORT_OLDEST_FIRST
q.search_threads.each do |t|
puts t.thread_id
puts 'thread:%s' % t.thread_id
end
EOF
test_begin_subtest "compare message ids"
notmuch search --sort=oldest-first --output=messages tag:inbox | sed s/^id:// > EXPECTED
notmuch search --sort=oldest-first --output=messages tag:inbox > EXPECTED
test_ruby <<"EOF"
q = db.query('tag:inbox')
q.sort = Notmuch::SORT_OLDEST_FIRST
q.search_messages.each do |m|
puts m.message_id
puts 'id:%s' % m.message_id
end
EOF