monotone-commits-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-commits-diffs] net.venge.monotone.issue-176: d2ee901188fa37aff


From: code
Subject: [Monotone-commits-diffs] net.venge.monotone.issue-176: d2ee901188fa37aff7ca9fe5351033ff4904759f
Date: Thu, 16 Feb 2012 01:27:01 +0100 (CET)

revision:            d2ee901188fa37aff7ca9fe5351033ff4904759f
date:                2012-02-15T22:25:15
author:              Richard Hopkins <address@hidden>
branch:              net.venge.monotone.issue-176
changelog:
Check results in 'selectors_with_parentheses' test

Just to be sure; this way we know it parses without error and we're not
missing out any tokens by accident.

Also add in an equivalent "safe" selector as a base line.

manifest:
format_version "1"

new_manifest [520a5eba2fe2507671a072c70607003a47895cc8]

old_revision [f0e8fc25accd506b9c4bcfce29b384a4801ebdc8]

patch "test/func/selectors_with_parentheses/__driver__.lua"
 from [bb61cc3e80cec408f632a91efce2862e4cd48482]
   to [a30672b31ae59ccfd5f1ef2db3cc6120cbb3e34c]
============================================================
--- test/func/selectors_with_parentheses/__driver__.lua	bb61cc3e80cec408f632a91efce2862e4cd48482
+++ test/func/selectors_with_parentheses/__driver__.lua	a30672b31ae59ccfd5f1ef2db3cc6120cbb3e34c
@@ -1,7 +1,5 @@
 -- See issue 176 - https://code.monotone.ca/p/monotone/issues/176/
 -- It reports parentheses being mismatched when they actually aren't.
--- We're primarily testing the selector parsing here and making sure
--- the command succeeds rather than checking the data.
 --
 -- The example given used the parentheses to combine multiple
 -- selectors with |, where A, B, and C represent other selectors.
@@ -76,10 +74,13 @@ other_2 = ci("otherbranch", other, "Jim"
 other_2 = ci("otherbranch", other, "Jim")
 
 -- Test reported example where parentheses are used for grouping multiple selectors
-check(mtn("automate", "select", "(a:Joe|a:Anne)/b:testbranch"), 0, true, nil)
+expect("(a:Joe|a:Anne)/b:testbranch", root, lhs, rhs, m)
 -- Simplified case using single selector
-check(mtn("automate", "select", "(a:Joe)/b:testbranch"), 0, true, nil)
+expect("(a:Joe)/b:testbranch", root, lhs)
+-- Removing the parentheses for the simplified case should be a no-op
+expect("a:Joe/b:testbranch", root, lhs)
 
--- Now lets swap the selectors around - should still work (and get same data if we cared)
-check(mtn("automate", "select", "b:testbranch/(a:Joe|a:Anne)"), 0, true, nil)
-check(mtn("automate", "select", "b:testbranch/(a:Joe)"), 0, true, nil)
+-- Now lets swap the selectors around - should still work and get same data
+expect("b:testbranch/(a:Joe|a:Anne)", root, lhs, rhs, m)
+expect("b:testbranch/(a:Joe)", root, lhs)
+expect("b:testbranch/a:Joe", root, lhs)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]