From addb71781edad339f6420d84c8cb3678cd1f7e8f Mon Sep 17 00:00:00 2001 From: kayrus Date: Fri, 11 Mar 2016 10:05:16 +0100 Subject: [PATCH] tests: fixed multiple sequenced tabs recognition When string has multiple sequenced tabs, SplitN recognized tab as a column, not separator. --- functional/util/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functional/util/util.go b/functional/util/util.go index b37f1a4b5..5942c011a 100644 --- a/functional/util/util.go +++ b/functional/util/util.go @@ -98,7 +98,7 @@ type UnitState struct { func ParseUnitStates(units []string) (states []UnitState) { for _, unit := range units { - cols := strings.SplitN(unit, "\t", 3) + cols := strings.Fields(unit) if len(cols) == 3 { machine := strings.SplitN(cols[2], "/", 2)[0] states = append(states, UnitState{cols[0], cols[1], machine})