| OLD | NEW |
| 1 // Copyright 2017 The LUCI Authors. All rights reserved. | 1 // Copyright 2017 The LUCI Authors. All rights reserved. |
| 2 // Use of this source code is governed under the Apache License, Version 2.0 | 2 // Use of this source code is governed under the Apache License, Version 2.0 |
| 3 // that can be found in the LICENSE file. | 3 // that can be found in the LICENSE file. |
| 4 | 4 |
| 5 package application | 5 package application |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "flag" | 8 "flag" |
| 9 "fmt" | 9 "fmt" |
| 10 "testing" | 10 "testing" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 []string{"-i", "-log-level", "debug"}, | 41 []string{"-i", "-log-level", "debug"}, |
| 42 []string{}, | 42 []string{}, |
| 43 []string{"-i", "-log-level", "debug"}, | 43 []string{"-i", "-log-level", "debug"}, |
| 44 }, | 44 }, |
| 45 | 45 |
| 46 { | 46 { |
| 47 []string{"-log-level", "--", "ohai"}, | 47 []string{"-log-level", "--", "ohai"}, |
| 48 []string{"-log-level"}, | 48 []string{"-log-level"}, |
| 49 []string{"--", "ohai"}, | 49 []string{"--", "ohai"}, |
| 50 }, | 50 }, |
| 51 |
| 52 { |
| 53 []string{"--log-level", "debug", "-d", "--", "sc
ript"}, |
| 54 []string{"--log-level", "debug"}, |
| 55 []string{"-d", "--", "script"}, |
| 56 }, |
| 51 } { | 57 } { |
| 52 Convey(fmt.Sprintf(`Flags %v are split into %v and %v`,
tc.args, tc.self, tc.extra), func() { | 58 Convey(fmt.Sprintf(`Flags %v are split into %v and %v`,
tc.args, tc.self, tc.extra), func() { |
| 53 self, extra := extractFlagsForSet(tc.args, fs) | 59 self, extra := extractFlagsForSet(tc.args, fs) |
| 54 So(self, ShouldResemble, tc.self) | 60 So(self, ShouldResemble, tc.self) |
| 55 So(extra, ShouldResemble, tc.extra) | 61 So(extra, ShouldResemble, tc.extra) |
| 56 }) | 62 }) |
| 57 } | 63 } |
| 58 }) | 64 }) |
| 59 } | 65 } |
| OLD | NEW |