Last active
April 6, 2018 05:19
-
-
Save zommerfelds/63fdbeb161fc6af3ce9224e39a16a2dc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Code generated by go-bindata. DO NOT EDIT. | |
// sources: | |
package inits | |
import ( | |
"bytes" | |
"compress/gzip" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"os" | |
"path/filepath" | |
"strings" | |
"time" | |
) | |
func bindataRead(data []byte, name string) ([]byte, error) { | |
gz, err := gzip.NewReader(bytes.NewBuffer(data)) | |
if err != nil { | |
return nil, fmt.Errorf("Read %q: %v", name, err) | |
} | |
var buf bytes.Buffer | |
_, err = io.Copy(&buf, gz) | |
clErr := gz.Close() | |
if err != nil { | |
return nil, fmt.Errorf("Read %q: %v", name, err) | |
} | |
if clErr != nil { | |
return nil, err | |
} | |
return buf.Bytes(), nil | |
} | |
type asset struct { | |
bytes []byte | |
info fileInfoEx | |
} | |
type fileInfoEx interface { | |
os.FileInfo | |
MD5Checksum() string | |
} | |
type bindataFileInfo struct { | |
name string | |
size int64 | |
mode os.FileMode | |
modTime time.Time | |
md5checksum string | |
} | |
func (fi bindataFileInfo) Name() string { | |
return fi.name | |
} | |
func (fi bindataFileInfo) Size() int64 { | |
return fi.size | |
} | |
func (fi bindataFileInfo) Mode() os.FileMode { | |
return fi.mode | |
} | |
func (fi bindataFileInfo) ModTime() time.Time { | |
return fi.modTime | |
} | |
func (fi bindataFileInfo) MD5Checksum() string { | |
return fi.md5checksum | |
} | |
func (fi bindataFileInfo) IsDir() bool { | |
return false | |
} | |
func (fi bindataFileInfo) Sys() interface{} { | |
return nil | |
} | |
// | |
// Asset loads and returns the asset for the given name. | |
// It returns an error if the asset could not be found or | |
// could not be loaded. | |
// | |
func Asset(name string) ([]byte, error) { | |
cannonicalName := strings.Replace(name, "\\", "/", -1) | |
if f, ok := _bindata[cannonicalName]; ok { | |
a, err := f() | |
if err != nil { | |
return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err) | |
} | |
return a.bytes, nil | |
} | |
return nil, &os.PathError{Op: "open", Path: name, Err: os.ErrNotExist} | |
} | |
// | |
// MustAsset is like Asset but panics when Asset would return an error. | |
// It simplifies safe initialization of global variables. | |
// nolint: deadcode | |
// | |
func MustAsset(name string) []byte { | |
a, err := Asset(name) | |
if err != nil { | |
panic("asset: Asset(" + name + "): " + err.Error()) | |
} | |
return a | |
} | |
// | |
// AssetInfo loads and returns the asset info for the given name. | |
// It returns an error if the asset could not be found or could not be loaded. | |
// | |
func AssetInfo(name string) (os.FileInfo, error) { | |
cannonicalName := strings.Replace(name, "\\", "/", -1) | |
if f, ok := _bindata[cannonicalName]; ok { | |
a, err := f() | |
if err != nil { | |
return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err) | |
} | |
return a.info, nil | |
} | |
return nil, &os.PathError{Op: "open", Path: name, Err: os.ErrNotExist} | |
} | |
// | |
// AssetNames returns the names of the assets. | |
// nolint: deadcode | |
// | |
func AssetNames() []string { | |
names := make([]string, 0, len(_bindata)) | |
for name := range _bindata { | |
names = append(names, name) | |
} | |
return names | |
} | |
// | |
// _bindata is a table, holding each asset generator, mapped to its name. | |
// | |
var _bindata = map[string]func() (*asset, error){ | |
} | |
// | |
// AssetDir returns the file names below a certain | |
// directory embedded in the file by go-bindata. | |
// For example if you run go-bindata on data/... and data contains the | |
// following hierarchy: | |
// data/ | |
// foo.txt | |
// img/ | |
// a.png | |
// b.png | |
// then AssetDir("data") would return []string{"foo.txt", "img"} | |
// AssetDir("data/img") would return []string{"a.png", "b.png"} | |
// AssetDir("foo.txt") and AssetDir("notexist") would return an error | |
// AssetDir("") will return []string{"data"}. | |
// | |
func AssetDir(name string) ([]string, error) { | |
node := _bintree | |
if len(name) != 0 { | |
cannonicalName := strings.Replace(name, "\\", "/", -1) | |
pathList := strings.Split(cannonicalName, "/") | |
for _, p := range pathList { | |
node = node.Children[p] | |
if node == nil { | |
return nil, &os.PathError{ | |
Op: "open", | |
Path: name, | |
Err: os.ErrNotExist, | |
} | |
} | |
} | |
} | |
if node.Func != nil { | |
return nil, &os.PathError{ | |
Op: "open", | |
Path: name, | |
Err: os.ErrNotExist, | |
} | |
} | |
rv := make([]string, 0, len(node.Children)) | |
for childName := range node.Children { | |
rv = append(rv, childName) | |
} | |
return rv, nil | |
} | |
type bintree struct { | |
Func func() (*asset, error) | |
Children map[string]*bintree | |
} | |
var _bintree = &bintree{Func: nil, Children: map[string]*bintree{}} | |
// RestoreAsset restores an asset under the given directory | |
func RestoreAsset(dir, name string) error { | |
data, err := Asset(name) | |
if err != nil { | |
return err | |
} | |
info, err := AssetInfo(name) | |
if err != nil { | |
return err | |
} | |
err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755)) | |
if err != nil { | |
return err | |
} | |
err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode()) | |
if err != nil { | |
return err | |
} | |
return os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime()) | |
} | |
// RestoreAssets restores an asset under the given directory recursively | |
func RestoreAssets(dir, name string) error { | |
children, err := AssetDir(name) | |
// File | |
if err != nil { | |
return RestoreAsset(dir, name) | |
} | |
// Dir | |
for _, child := range children { | |
err = RestoreAssets(dir, filepath.Join(name, child)) | |
if err != nil { | |
return err | |
} | |
} | |
return nil | |
} | |
func _filePath(dir, name string) string { | |
cannonicalName := strings.Replace(name, "\\", "/", -1) | |
return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: Command with no arguments | |
Scenario: Output when command is run without args # features/command.feature:3 | |
When I successfully run `scmpuff` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
Then the exit status should be 0 # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:197 | |
And the output should contain: # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:156 | |
""" | |
scmpuff extends common git commands with numeric filename shortcuts. | |
""" | |
And the output should contain "Usage:" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:140 | |
And the output should contain "Available Commands:" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:140 | |
Feature: command expansion at command line | |
Background: # features/command_expand.feature:3 | |
Given I override the environment variables to: # features/step_definitions/scmpuff_steps.rb:88 | |
| variable | value | | |
| e1 | a.txt | | |
| e2 | b.txt | | |
| e3 | c.txt | | |
| e4 | d.txt | | |
| e5 | e.txt | | |
| e6 | f.txt | | |
Scenario: Expand single digit case # features/command_expand.feature:13 | |
Important: note we check for an exact match here, because a line feed | |
should not exist at the end of the output. | |
When I successfully run `scmpuff expand 1` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
Then the output should contain exactly "a.txt" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:166 | |
Scenario: Expand multiple digit case # features/command_expand.feature:20 | |
When I successfully run `scmpuff expand 1 2 6` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
Then the output should match /a.txt\tb.txt\tf.txt/ # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:180 | |
Scenario: Expand complex case with range # features/command_expand.feature:24 | |
When I successfully run `scmpuff expand 6 3-4 1` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
Then the output should match /f.txt\tc.txt\td.txt\ta.txt/ # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:180 | |
Scenario: Dont expand files or directories with numeric names # features/command_expand.feature:28 | |
Given an empty file named "1" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:42 | |
Given a directory named "2" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:20 | |
When I successfully run `scmpuff expand 3 2 1` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
Then the output should contain "c.txt" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:140 | |
But the output should not contain "b.txt" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:152 | |
And the output should not contain "a.txt" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:152 | |
Scenario: Dont interfere with CLI "options" that are passed along after `--` # features/command_expand.feature:36 | |
When I successfully run `scmpuff expand -- git foo -x 1` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
Then the output should match /git\tfoo\t-x\ta.txt/ # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:180 | |
Scenario: Make sure args with spaces get escaped on way back # features/command_expand.feature:40 | |
When I successfully run `scmpuff expand -- git xxx "foo bar" 1` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
Then the output should match /git\txxx\tfoo\\ bar\ta.txt/ # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:180 | |
Scenario Outline: Verify filenames with stupid characters are properly escaped # features/command_expand.feature:44 | |
Given I override the environment variables to: # features/step_definitions/scmpuff_steps.rb:88 | |
| variable | value | | |
| e1 | <filename> | | |
When I successfully run `scmpuff expand 1` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
Then the output should contain exactly "<escaped>" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:166 | |
Examples: | |
| filename | escaped | | |
| so(dumb).jpg | so\\(dumb\\).jpg | | |
| hi mom.txt | hi\\ mom.txt | | |
| "x.txt | \\"x.txt | | |
| wt;af.gif | wt\\;af.gif | | |
| foo\|bar | foo\\|bar | | |
Scenario: Semicolons in commit messages # features/command_expand.feature:58 | |
Given a git repository named "whatever" # features/step_definitions/scmpuff_steps.rb:4 | |
And I cd to "whatever" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:75 | |
And a 4 byte file named "a.txt" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:38 | |
And I successfully run the following commands: # features/step_definitions/scmpuff_steps.rb:111 | |
| git add a.txt | | |
When I successfully run `scmpuff expand -- git commit -m "foo; bar"` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
Then the stderr should not contain anything # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:274 | |
And the output should match /git\tcommit\t-m\tfoo\\;\\ bar/ # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:180 | |
Scenario: Allow user to specify --relative paths # features/command_expand.feature:68 | |
Given a directory named "foo" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:20 | |
And a directory named "foo/bar" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:20 | |
And an empty file named "xxx.jpg" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:42 | |
And I cd to "foo/bar" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:75 | |
Given I override environment variable "e1" to the absolute path of "xxx.jpg" # features/step_definitions/scmpuff_steps.rb:96 | |
When I successfully run `scmpuff expand 1` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
Then the stdout from "scmpuff expand 1" should contain "/tmp/aruba/xxx.jpg" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:246 | |
When I successfully run `scmpuff expand -r -- 1` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
Then the stdout from "scmpuff expand -r -- 1" should contain "../../xxx.jpg" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:246 | |
Scenario: Don't trim empty string args when expanding command # features/command_expand.feature:79 | |
There are certain situations where someone would want to actually pass an | |
empty string arg, so we need to make sure we don't trim that out. | |
Essentially we want to avoid the error condition reported here: | |
https://github.com/ndbroadbent/scm_breeze/issues/167 | |
When I successfully run `scmpuff expand -- hub commit --allow-empty --allow-empty-message -m ''` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
Then the output should match /hub\tcommit\t--allow-empty\t--allow-empty-message\t-m\t\'\'/ # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:180 | |
Feature: init command | |
Background: # features/command_init.feature:3 | |
Given a mocked home directory # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:363 | |
Scenario: init -s should contain status shortcuts # features/command_init.feature:6 | |
When I successfully run `scmpuff init -s` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
Exit status was 2 but expected it to be 0. Output: | |
panic: Could not find bindata asset file: data/status_shortcuts.sh | |
goroutine 1 [running]: | |
github.com/mroth/scmpuff/commands/inits.assetString(0x5c96ba, 0x18, 0x0, 0x0) | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:34 +0x15d | |
github.com/mroth/scmpuff/commands/inits.printScript() | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:16 +0x191 | |
github.com/mroth/scmpuff/commands/inits.CommandInit.func1(0xc4200ee000, 0xc42008e530, 0x0, 0x1) | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/init.go:29 +0x31 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).execute(0xc4200ee000, 0xc42008e520, 0x1, 0x1, 0xc4200ee000, 0xc42008e520) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:650 +0x234 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x6c6d00, 0x0, 0xc4200ee480, 0x6c6e58) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:737 +0x2d4 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).Execute(0x6c6d00, 0xc42005df50, 0x1) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:695 +0x2b | |
main.main() | |
/home/aero/go/src/github.com/mroth/scmpuff/main.go:44 +0x17c | |
(RSpec::Expectations::ExpectationNotMetError) | |
features/command_init.feature:7:in `When I successfully run `scmpuff init -s`' | |
Then the output should contain "scmpuff_status()" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:140 | |
Scenario Outline: --aliases controls short aliases in output (default: yes) # features/command_init.feature:10 | |
When I successfully run `scmpuff init <flags>` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
Then the output <should?> contain "alias gs='scmpuff_status'" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:140 | |
And the output <should?> contain "alias ga='git add'" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:140 | |
Examples: | |
| flags | should? | | |
| -s | should | | |
Exit status was 2 but expected it to be 0. Output: | |
panic: Could not find bindata asset file: data/status_shortcuts.sh | |
goroutine 1 [running]: | |
github.com/mroth/scmpuff/commands/inits.assetString(0x5c96ba, 0x18, 0x0, 0x0) | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:34 +0x15d | |
github.com/mroth/scmpuff/commands/inits.printScript() | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:16 +0x191 | |
github.com/mroth/scmpuff/commands/inits.CommandInit.func1(0xc4200ee000, 0xc42008e530, 0x0, 0x1) | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/init.go:29 +0x31 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).execute(0xc4200ee000, 0xc42008e520, 0x1, 0x1, 0xc4200ee000, 0xc42008e520) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:650 +0x234 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x6c6d00, 0x0, 0xc4200ee480, 0x6c6e58) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:737 +0x2d4 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).Execute(0x6c6d00, 0xc42005df50, 0x1) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:695 +0x2b | |
main.main() | |
/home/aero/go/src/github.com/mroth/scmpuff/main.go:44 +0x17c | |
(RSpec::Expectations::ExpectationNotMetError) | |
features/command_init.feature:11:in `When I successfully run `scmpuff init <flags>`' | |
| -as | should | | |
Exit status was 2 but expected it to be 0. Output: | |
panic: Could not find bindata asset file: data/status_shortcuts.sh | |
goroutine 1 [running]: | |
github.com/mroth/scmpuff/commands/inits.assetString(0x5c96ba, 0x18, 0x0, 0x0) | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:34 +0x15d | |
github.com/mroth/scmpuff/commands/inits.printScript() | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:16 +0x191 | |
github.com/mroth/scmpuff/commands/inits.CommandInit.func1(0xc4200c8000, 0xc42004e540, 0x0, 0x1) | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/init.go:29 +0x31 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).execute(0xc4200c8000, 0xc42004e530, 0x1, 0x1, 0xc4200c8000, 0xc42004e530) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:650 +0x234 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x6c6d00, 0x0, 0xc4200c8480, 0x6c6e58) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:737 +0x2d4 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).Execute(0x6c6d00, 0xc42005df50, 0x1) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:695 +0x2b | |
main.main() | |
/home/aero/go/src/github.com/mroth/scmpuff/main.go:44 +0x17c | |
(RSpec::Expectations::ExpectationNotMetError) | |
features/command_init.feature:11:in `When I successfully run `scmpuff init <flags>`' | |
| -a -s | should | | |
Exit status was 2 but expected it to be 0. Output: | |
panic: Could not find bindata asset file: data/status_shortcuts.sh | |
goroutine 1 [running]: | |
github.com/mroth/scmpuff/commands/inits.assetString(0x5c96ba, 0x18, 0x0, 0x0) | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:34 +0x15d | |
github.com/mroth/scmpuff/commands/inits.printScript() | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:16 +0x191 | |
github.com/mroth/scmpuff/commands/inits.CommandInit.func1(0xc4200ee000, 0xc4200a8400, 0x0, 0x2) | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/init.go:29 +0x31 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).execute(0xc4200ee000, 0xc4200a8200, 0x2, 0x2, 0xc4200ee000, 0xc4200a8200) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:650 +0x234 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x6c6d00, 0x0, 0xc4200ee480, 0x6c6e58) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:737 +0x2d4 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).Execute(0x6c6d00, 0xc42005df50, 0x1) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:695 +0x2b | |
main.main() | |
/home/aero/go/src/github.com/mroth/scmpuff/main.go:44 +0x17c | |
(RSpec::Expectations::ExpectationNotMetError) | |
features/command_init.feature:11:in `When I successfully run `scmpuff init <flags>`' | |
| -s --aliases=true | should | | |
Exit status was 2 but expected it to be 0. Output: | |
panic: Could not find bindata asset file: data/status_shortcuts.sh | |
goroutine 1 [running]: | |
github.com/mroth/scmpuff/commands/inits.assetString(0x5c96ba, 0x18, 0x0, 0x0) | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:34 +0x15d | |
github.com/mroth/scmpuff/commands/inits.printScript() | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:16 +0x191 | |
github.com/mroth/scmpuff/commands/inits.CommandInit.func1(0xc4200d6000, 0xc42000c3c0, 0x0, 0x2) | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/init.go:29 +0x31 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).execute(0xc4200d6000, 0xc42000c240, 0x2, 0x2, 0xc4200d6000, 0xc42000c240) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:650 +0x234 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x6c6d00, 0x0, 0xc4200d6480, 0x6c6e58) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:737 +0x2d4 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).Execute(0x6c6d00, 0xc42005df50, 0x1) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:695 +0x2b | |
main.main() | |
/home/aero/go/src/github.com/mroth/scmpuff/main.go:44 +0x17c | |
(RSpec::Expectations::ExpectationNotMetError) | |
features/command_init.feature:11:in `When I successfully run `scmpuff init <flags>`' | |
| -s --aliases=false | should not | | |
Exit status was 2 but expected it to be 0. Output: | |
panic: Could not find bindata asset file: data/status_shortcuts.sh | |
goroutine 1 [running]: | |
github.com/mroth/scmpuff/commands/inits.assetString(0x5c96ba, 0x18, 0x0, 0x0) | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:34 +0x15d | |
github.com/mroth/scmpuff/commands/inits.printScript() | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:16 +0x191 | |
github.com/mroth/scmpuff/commands/inits.CommandInit.func1(0xc4200ec000, 0xc4200a6360, 0x0, 0x2) | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/init.go:29 +0x31 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).execute(0xc4200ec000, 0xc4200a61e0, 0x2, 0x2, 0xc4200ec000, 0xc4200a61e0) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:650 +0x234 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x6c6d00, 0x0, 0xc4200ec480, 0x6c6e58) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:737 +0x2d4 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).Execute(0x6c6d00, 0xc42005df50, 0x1) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:695 +0x2b | |
main.main() | |
/home/aero/go/src/github.com/mroth/scmpuff/main.go:44 +0x17c | |
(RSpec::Expectations::ExpectationNotMetError) | |
features/command_init.feature:11:in `When I successfully run `scmpuff init <flags>`' | |
Scenario Outline: --wrap controls git cmd wrapping in output (default: yes) # features/command_init.feature:22 | |
When I successfully run `scmpuff init <flags>` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
Then the output <should?> contain "function git()" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:140 | |
Examples: | |
| flags | should? | | |
| -s | should | | |
Exit status was 2 but expected it to be 0. Output: | |
panic: Could not find bindata asset file: data/status_shortcuts.sh | |
goroutine 1 [running]: | |
github.com/mroth/scmpuff/commands/inits.assetString(0x5c96ba, 0x18, 0x0, 0x0) | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:34 +0x15d | |
github.com/mroth/scmpuff/commands/inits.printScript() | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:16 +0x191 | |
github.com/mroth/scmpuff/commands/inits.CommandInit.func1(0xc4200f0000, 0xc42008e530, 0x0, 0x1) | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/init.go:29 +0x31 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).execute(0xc4200f0000, 0xc42008e520, 0x1, 0x1, 0xc4200f0000, 0xc42008e520) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:650 +0x234 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x6c6d00, 0x0, 0xc4200f0480, 0x6c6e58) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:737 +0x2d4 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).Execute(0x6c6d00, 0xc42005df50, 0x1) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:695 +0x2b | |
main.main() | |
/home/aero/go/src/github.com/mroth/scmpuff/main.go:44 +0x17c | |
(RSpec::Expectations::ExpectationNotMetError) | |
features/command_init.feature:23:in `When I successfully run `scmpuff init <flags>`' | |
| -ws | should | | |
Exit status was 2 but expected it to be 0. Output: | |
panic: Could not find bindata asset file: data/status_shortcuts.sh | |
goroutine 1 [running]: | |
github.com/mroth/scmpuff/commands/inits.assetString(0x5c96ba, 0x18, 0x0, 0x0) | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:34 +0x15d | |
github.com/mroth/scmpuff/commands/inits.printScript() | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:16 +0x191 | |
github.com/mroth/scmpuff/commands/inits.CommandInit.func1(0xc4200d8000, 0xc42004e540, 0x0, 0x1) | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/init.go:29 +0x31 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).execute(0xc4200d8000, 0xc42004e530, 0x1, 0x1, 0xc4200d8000, 0xc42004e530) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:650 +0x234 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x6c6d00, 0x0, 0xc4200d8480, 0x6c6e58) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:737 +0x2d4 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).Execute(0x6c6d00, 0xc42005df50, 0x1) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:695 +0x2b | |
main.main() | |
/home/aero/go/src/github.com/mroth/scmpuff/main.go:44 +0x17c | |
(RSpec::Expectations::ExpectationNotMetError) | |
features/command_init.feature:23:in `When I successfully run `scmpuff init <flags>`' | |
| -w -s | should | | |
Exit status was 2 but expected it to be 0. Output: | |
panic: Could not find bindata asset file: data/status_shortcuts.sh | |
goroutine 1 [running]: | |
github.com/mroth/scmpuff/commands/inits.assetString(0x5c96ba, 0x18, 0x0, 0x0) | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:34 +0x15d | |
github.com/mroth/scmpuff/commands/inits.printScript() | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:16 +0x191 | |
github.com/mroth/scmpuff/commands/inits.CommandInit.func1(0xc4200ee000, 0xc4200a8400, 0x0, 0x2) | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/init.go:29 +0x31 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).execute(0xc4200ee000, 0xc4200a8200, 0x2, 0x2, 0xc4200ee000, 0xc4200a8200) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:650 +0x234 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x6c6d00, 0x0, 0xc4200ee480, 0x6c6e58) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:737 +0x2d4 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).Execute(0x6c6d00, 0xc42005df50, 0x1) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:695 +0x2b | |
main.main() | |
/home/aero/go/src/github.com/mroth/scmpuff/main.go:44 +0x17c | |
(RSpec::Expectations::ExpectationNotMetError) | |
features/command_init.feature:23:in `When I successfully run `scmpuff init <flags>`' | |
| -s --wrap=true | should | | |
Exit status was 2 but expected it to be 0. Output: | |
panic: Could not find bindata asset file: data/status_shortcuts.sh | |
goroutine 1 [running]: | |
github.com/mroth/scmpuff/commands/inits.assetString(0x5c96ba, 0x18, 0x0, 0x0) | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:34 +0x15d | |
github.com/mroth/scmpuff/commands/inits.printScript() | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:16 +0x191 | |
github.com/mroth/scmpuff/commands/inits.CommandInit.func1(0xc4200ec000, 0xc4200a6360, 0x0, 0x2) | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/init.go:29 +0x31 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).execute(0xc4200ec000, 0xc4200a61e0, 0x2, 0x2, 0xc4200ec000, 0xc4200a61e0) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:650 +0x234 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x6c6d00, 0x0, 0xc4200ec480, 0x6c6e58) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:737 +0x2d4 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).Execute(0x6c6d00, 0xc42005df50, 0x1) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:695 +0x2b | |
main.main() | |
/home/aero/go/src/github.com/mroth/scmpuff/main.go:44 +0x17c | |
(RSpec::Expectations::ExpectationNotMetError) | |
features/command_init.feature:23:in `When I successfully run `scmpuff init <flags>`' | |
| -s --wrap=false | should not | | |
Exit status was 2 but expected it to be 0. Output: | |
panic: Could not find bindata asset file: data/status_shortcuts.sh | |
goroutine 1 [running]: | |
github.com/mroth/scmpuff/commands/inits.assetString(0x5c96ba, 0x18, 0x0, 0x0) | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:34 +0x15d | |
github.com/mroth/scmpuff/commands/inits.printScript() | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:16 +0x191 | |
github.com/mroth/scmpuff/commands/inits.CommandInit.func1(0xc4200fa000, 0xc4200b2360, 0x0, 0x2) | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/init.go:29 +0x31 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).execute(0xc4200fa000, 0xc4200b21e0, 0x2, 0x2, 0xc4200fa000, 0xc4200b21e0) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:650 +0x234 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x6c6d00, 0x0, 0xc4200fa480, 0x6c6e58) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:737 +0x2d4 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).Execute(0x6c6d00, 0xc42005df50, 0x1) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:695 +0x2b | |
main.main() | |
/home/aero/go/src/github.com/mroth/scmpuff/main.go:44 +0x17c | |
(RSpec::Expectations::ExpectationNotMetError) | |
features/command_init.feature:23:in `When I successfully run `scmpuff init <flags>`' | |
Scenario Outline: Evaling init -s defines status shortcuts in environment # features/command_init.feature:33 | |
When I run `<shell>` interactively # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:113 | |
And I type `eval "$(scmpuff init -s)"` # features/step_definitions/scmpuff_steps.rb:104 | |
And I type "type scmpuff_status" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:117 | |
And I type "type scmpuff_clear_vars" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:117 | |
And I type "exit" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:117 | |
Then the output should not contain "not found" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:152 | |
Examples: | |
| shell | | |
| bash | | |
expected "panic: Could not find bindata asset file: data/status_shortcuts.sh\n\ngoroutine 1 [running]:\ngithub...nbash: line 2: type: scmpuff_status: not found\nbash: line 3: type: scmpuff_clear_vars: not found\n" not to include "not found" (RSpec::Expectations::ExpectationNotMetError) | |
features/command_init.feature:39:in `Then the output should not contain "not found"' | |
| zsh | | |
expected "scmpuff_status not found\nscmpuff_clear_vars not found\npanic: Could not find bindata asset file: da...command.go:695 +0x2b\nmain.main()\n\t/home/aero/go/src/github.com/mroth/scmpuff/main.go:44 +0x17c\n" not to include "not found" (RSpec::Expectations::ExpectationNotMetError) | |
features/command_init.feature:39:in `Then the output should not contain "not found"' | |
Feature: status command | |
Background: # features/command_status.feature:3 | |
Given a mocked home directory # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:363 | |
@outside-repo | |
Scenario: Appropriate error status when not in a git repo # features/command_status.feature:7 | |
We can make this pretty, but we also want to be sure to use the same exit | |
code as the normal 'git' command line client for consistency. | |
When I run `scmpuff status` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:93 | |
Then the exit status should be 128 # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:197 | |
And the output should contain: # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:156 | |
""" | |
Not a git repository (or any of the parent directories) | |
""" | |
Scenario: Banner shows no changes when in an unchanged git repo # features/command_status.feature:18 | |
Given I am in a git repository # features/step_definitions/scmpuff_steps.rb:17 | |
When I successfully run `scmpuff status` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
Then the output should contain "No changes (working directory clean)" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:140 | |
Scenario: Banner shows expansion reminder when in a changed git repo # features/command_status.feature:24 | |
Given I am in a git repository # features/step_definitions/scmpuff_steps.rb:17 | |
And an empty file named "whatever" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:42 | |
When I successfully run `scmpuff status` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
Then the output should contain "| [*] => $e*" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:140 | |
Scenario: Banner shows current branch name # features/command_status.feature:31 | |
Given I am in a git repository # features/step_definitions/scmpuff_steps.rb:17 | |
When I successfully run `scmpuff status` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
Then the stdout from "scmpuff status" should contain "On branch: master" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:246 | |
When I switch to git branch "foobar" # features/step_definitions/scmpuff_steps.rb:25 | |
And I successfully run `scmpuff status` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
Then the stdout from "scmpuff status" should contain "On branch: foobar" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:246 | |
Scenario: Banner shows position relative to remote status # features/command_status.feature:41 | |
Given a git repository named "simulatedremote" # features/step_definitions/scmpuff_steps.rb:4 | |
And I cd to "simulatedremote" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:75 | |
And a 4 byte file named "a.txt" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:38 | |
And I successfully run the following commands: # features/step_definitions/scmpuff_steps.rb:111 | |
| git config receive.denyCurrentBranch ignore | | |
| git add a.txt | | |
| git commit -m "made a file" | | |
And I cd to ".." # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:75 | |
Given I clone "simulatedremote" to "local" # features/step_definitions/scmpuff_steps.rb:37 | |
And I cd to "local" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:75 | |
And a 4 byte file named "b.txt" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:38 | |
Given I successfully run the following commands: # features/step_definitions/scmpuff_steps.rb:111 | |
| git add b.txt | | |
| git commit -m "made another file" | | |
When I successfully run `scmpuff status` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
Then the stdout from "scmpuff status" should contain "| +1 |" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:246 | |
Given I successfully run the following commands: # features/step_definitions/scmpuff_steps.rb:111 | |
| git push | | |
| git reset HEAD~1 | | |
When I successfully run `scmpuff status` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
Then the stdout from "scmpuff status" should contain "| -1 |" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:246 | |
Scenario: Status properly reports all file changes # features/command_status.feature:70 | |
Given I am in a complex working tree status matching scm_breeze tests # features/step_definitions/scmpuff_steps.rb:43 | |
When I run `scmpuff status` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:93 | |
Then the exit status should be 0 # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:197 | |
And the output should match / new file: *\[1\] *new_file/ # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:180 | |
And the output should match / deleted: *\[2\] *deleted_file/ # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:180 | |
And the output should match / modified: *\[3\] *new_file/ # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:180 | |
And the output should match /untracked: *\[4\] *untracked_file/ # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:180 | |
Scenario Outline: Handles file path magic properly for new & untracked files # features/command_status.feature:81 | |
You would think this would be the same across file groups, but in fact the | |
way `git status --porcelain` outputs these is different, so we need to test | |
this scenario seperately. | |
(For example, prior to a4f2282 new files would fail when untracked worked | |
fine -- the difference being git porcelain seems to want to escape/quote | |
filenames only once added to the index, weird huh?) | |
Given I am in the mocked git repository with commited subdirectory and file # features/step_definitions/scmpuff_steps.rb:64 | |
And an empty file named "<gitpath>" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:42 | |
And I cd to "<cwd>" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:75 | |
When I successfully run `scmpuff status` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
Then the stdout from "scmpuff status" should contain: # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:258 | |
""" | |
untracked: [1] <displaypath> | |
""" | |
When I successfully run `scmpuff status -f --display=false` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
Then the stdout from "scmpuff status -f --display=false" should contain: # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:258 | |
""" | |
<abspath_end> | |
""" | |
Given I successfully run `git add "<displaypath>"` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
When I successfully run `scmpuff status` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
Then the stdout from "scmpuff status" should contain: # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:258 | |
""" | |
new file: [1] <displaypath> | |
""" | |
When I successfully run `scmpuff status -f --display=false` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
Then the stdout from "scmpuff status -f --display=false" should contain: # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:258 | |
""" | |
<abspath_end> | |
""" | |
Examples: | |
| cwd | gitpath | abspath_end | displaypath | | |
| . | a.txt | /a.txt | a.txt | | |
| . | foo/b.txt | /foo/b.txt | foo/b.txt | | |
| foo | foo/b.txt | /foo/b.txt | b.txt | | |
| foo | a.txt | /a.txt | ../a.txt | | |
| . | hi mom.txt | /hi mom.txt | hi mom.txt | | |
| . | (x).txt | /(x).txt | (x).txt | | |
Scenario: Handle changes involving multiple filenames properly # features/command_status.feature:126 | |
Certain operations (rename) can involve multiple filenames. | |
The ideal scenario is that the absolute destination filename gets set as the | |
path for environment (so it can be references in git cmds), and the display | |
shows a pretty arrowized status, e.g. foo -> bar, which should also be path | |
aware relative to current working directory (for both items!). | |
Given I am in a git repository # features/step_definitions/scmpuff_steps.rb:17 | |
And an empty file named "a.txt" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:42 | |
And a directory named "foo" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:20 | |
And I successfully run the following commands: # features/step_definitions/scmpuff_steps.rb:111 | |
| git add a.txt | | |
| git commit -am. | | |
| git mv a.txt b.txt | | |
When I successfully run `scmpuff status` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
Then the stdout from "scmpuff status" should contain: # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:258 | |
""" | |
renamed: [1] a.txt -> b.txt | |
""" | |
When I successfully run `scmpuff status -f --display=false` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
Then the stdout from "scmpuff status -f --display=false" should contain: # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:258 | |
""" | |
/tmp/aruba/mygitrepo/b.txt\n | |
""" | |
Given I cd to "foo" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:75 | |
When I successfully run `scmpuff status` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
Then the stdout from "scmpuff status" should contain: # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:258 | |
""" | |
renamed: [1] ../a.txt -> ../b.txt | |
""" | |
When I successfully run `scmpuff status -f --display=false` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
Then the stdout from "scmpuff status -f --display=false" should contain: # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:258 | |
""" | |
/tmp/aruba/mygitrepo/b.txt\n | |
""" | |
@recent-git-only | |
Scenario: Handle change detection properly # features/command_status.feature:166 | |
Change detection is currently fairly rare in `git status`, mostly it only | |
happens after in index via diff or show. But it can occur, so make sure we | |
support it when it happens, as it may be baked in better in the future. | |
Change detection naturally involves two filepaths, like rename. | |
In theory this is redundant with the "multiple filenames" scenario above, | |
but since change detection seems somewhat in flux we want to test for it | |
seperately in case its behavior changes in future versions of git. | |
Thanks to @peff on git mailing list for conditions to reproduce this. | |
Given I am in a git repository # features/step_definitions/scmpuff_steps.rb:17 | |
And a 1000 byte file named "file" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:38 | |
And I successfully run the following commands: # features/step_definitions/scmpuff_steps.rb:111 | |
| git add file | | |
| git commit -m base | | |
| mv file other | | |
Then I append to "file" with "foo" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:63 | |
And I successfully run `git add .` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
When I successfully run `git status --short` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
Then the stdout from "git status --short" should contain: # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:258 | |
""" | |
M file | |
C file -> other | |
""" | |
When I successfully run `scmpuff status` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
Then the stdout from "scmpuff status" should contain: # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:258 | |
""" | |
modified: [1] file | |
""" | |
And the stdout from "scmpuff status" should contain: # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:258 | |
""" | |
copied: [2] file -> other | |
""" | |
Scenario: Status for a complex merge conflict # features/command_status.feature:205 | |
Test by duplicating exactly the test_git_status_shortcuts_merge_conflicts() | |
tests from scm_breeze. | |
Given I am in a git repository # features/step_definitions/scmpuff_steps.rb:17 | |
And an empty file named "both_modified" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:42 | |
And an empty file named "both_deleted" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:42 | |
And an empty file named "deleted_by_them" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:42 | |
And an empty file named "deleted_by_us" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:42 | |
And a file named "renamed_file" with: # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:29 | |
""" | |
renamed file needs some content | |
""" | |
And I successfully run `git add both_modified both_deleted renamed_file deleted_by_them deleted_by_us` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
And I successfully run `git commit -m "First commit"` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
And I successfully run `git checkout -b conflict_branch` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
And a file named "both_added" with: # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:29 | |
""" | |
added by branch | |
""" | |
And I append to "both_modified" with "branch line" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:63 | |
And I append to "deleted_by_us" with "deleted by us" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:63 | |
And I successfully run `git rm deleted_by_them both_deleted` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
And I successfully run `git mv renamed_file renamed_file_on_branch` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
And I successfully run `git add both_added both_modified deleted_by_us` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
And I successfully run `git commit -m "Branch commit"` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
And I successfully run `git checkout master` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
And I append to "both_added" with "added by master" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:63 | |
And I append to "both_modified" with "master line" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:63 | |
And I append to "deleted_by_them" with "deleted by them" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:63 | |
And I successfully run `git rm deleted_by_us both_deleted` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
And I successfully run `git mv renamed_file renamed_file_on_master` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
And I successfully run `git add both_added both_modified deleted_by_them` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
And I successfully run `git commit -m "Master commit"` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
And I run `git merge conflict_branch` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:93 | |
When I successfully run `scmpuff status` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
Then the output should match /both added: *\[[0-9]*\] *both_added/ # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:180 | |
Then the output should match /both modified: *\[[0-9]*\] *both_modified/ # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:180 | |
Then the output should match /deleted by them: *\[[0-9]*\] *deleted_by_them/ # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:180 | |
Then the output should match /deleted by us: *\[[0-9]*\] *deleted_by_us/ # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:180 | |
Then the output should match /both deleted: *\[[0-9]*\] *renamed_file/ # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:180 | |
Then the output should match /added by them: *\[[0-9]*\] *renamed_file_on_branch/ # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:180 | |
Then the output should match /added by us: *\[[0-9]*\] *renamed_file_on_master/ # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:180 | |
Scenario: Status for a handling a conflict when rebasing # features/command_status.feature:252 | |
Given I am in a git repository # features/step_definitions/scmpuff_steps.rb:17 | |
And a file named "file_with_conflict" with: # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:29 | |
""" | |
original content | |
""" | |
And I successfully run `git add file_with_conflict` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
And I successfully run `git commit -m "Original content"` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
When I switch to git branch "foobar" # features/step_definitions/scmpuff_steps.rb:25 | |
And I append to "file_with_conflict" with "a change from foobar" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:63 | |
And I successfully run `git add file_with_conflict` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
And I successfully run `git commit -m "Edited in branch foobar"` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
When I switch to existing git branch "master" # features/step_definitions/scmpuff_steps.rb:31 | |
And I append to "file_with_conflict" with "a change from master" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:63 | |
And I successfully run `git add file_with_conflict` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
And I successfully run `git commit -m "Edited in branch master"` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
When I switch to existing git branch "foobar" # features/step_definitions/scmpuff_steps.rb:31 | |
And I run `git rebase master` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:93 | |
And I successfully run `scmpuff status` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
Then the output should match /On branch: HEAD \(no branch\)/ # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:180 | |
Feature: scmpuff_status function | |
The scmpuff_status shell function wraps the underlying | |
`scmpuff status` command, passing along the `--filelist` option and then | |
parsing the results to set environment variables in the current shell. | |
Background: # features/shell_functions.feature:6 | |
Given a mocked home directory # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:363 | |
@outside-repo | |
Scenario Outline: Handle error conditions from wrapped binary command # features/shell_functions.feature:10 | |
It is possible for the underlying `scmpuff status` command wrapped by our | |
shell function to produce errors, for example, when not in a git repository. | |
In keeping with the design theory of this program (handle as much as | |
possible in the binary), we want to make sure those error messages are | |
propogated to the user and not swallowed by the shell function, and that | |
non-zero exit codes from the underlying process are preserved. | |
When I run `<shell>` interactively # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:113 | |
And I type `eval "$(scmpuff init -ws)"` # features/step_definitions/scmpuff_steps.rb:104 | |
And I type "scmpuff_status" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:117 | |
And I type "exit $?" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:117 | |
Then the exit status should be 128 # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:197 | |
And the output should contain: # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:156 | |
""" | |
Not a git repository (or any of the parent directories) | |
""" | |
Examples: | |
| shell | | |
| bash | | |
Exit status was 127 but expected it to be 128. Output: | |
panic: Could not find bindata asset file: data/status_shortcuts.sh | |
goroutine 1 [running]: | |
github.com/mroth/scmpuff/commands/inits.assetString(0x5c96ba, 0x18, 0x0, 0x0) | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:34 +0x15d | |
github.com/mroth/scmpuff/commands/inits.printScript() | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:16 +0x191 | |
github.com/mroth/scmpuff/commands/inits.CommandInit.func1(0xc4200ee000, 0xc42008e530, 0x0, 0x1) | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/init.go:29 +0x31 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).execute(0xc4200ee000, 0xc42008e520, 0x1, 0x1, 0xc4200ee000, 0xc42008e520) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:650 +0x234 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x6c6d00, 0x0, 0xc4200ee480, 0x6c6e58) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:737 +0x2d4 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).Execute(0x6c6d00, 0xc42005df50, 0x1) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:695 +0x2b | |
main.main() | |
/home/aero/go/src/github.com/mroth/scmpuff/main.go:44 +0x17c | |
bash: line 2: scmpuff_status: command not found | |
(RSpec::Expectations::ExpectationNotMetError) | |
features/shell_functions.feature:23:in `Then the exit status should be 128' | |
| zsh | | |
Exit status was 127 but expected it to be 128. Output: | |
panic: Could not find bindata asset file: data/status_shortcuts.sh | |
goroutine 1 [running]: | |
github.com/mroth/scmpuff/commands/inits.assetString(0x5c96ba, 0x18, 0x0, 0x0) | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:34 +0x15d | |
github.com/mroth/scmpuff/commands/inits.printScript() | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:16 +0x191 | |
github.com/mroth/scmpuff/commands/inits.CommandInit.func1(0xc4200d6000, 0xc42004e540, 0x0, 0x1) | |
/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/init.go:29 +0x31 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).execute(0xc4200d6000, 0xc42004e530, 0x1, 0x1, 0xc4200d6000, 0xc42004e530) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:650 +0x234 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x6c6d00, 0x0, 0xc4200d6480, 0x6c6e58) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:737 +0x2d4 | |
github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).Execute(0x6c6d00, 0xc42005df50, 0x1) | |
/home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:695 +0x2b | |
main.main() | |
/home/aero/go/src/github.com/mroth/scmpuff/main.go:44 +0x17c | |
zsh: command not found: scmpuff_status | |
(RSpec::Expectations::ExpectationNotMetError) | |
features/shell_functions.feature:23:in `Then the exit status should be 128' | |
Scenario Outline: Basic functionality works with shell wrapper. # features/shell_functions.feature:33 | |
Given I am in a git repository # features/step_definitions/scmpuff_steps.rb:17 | |
When I run `<shell>` interactively # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:113 | |
And I type `eval "$(scmpuff init -ws)"` # features/step_definitions/scmpuff_steps.rb:104 | |
And I type "scmpuff_status" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:117 | |
And I type "exit $?" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:117 | |
Then the exit status should be 0 # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:197 | |
And the output should contain "No changes (working directory clean)" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:140 | |
Examples: | |
| shell | | |
| bash | | |
expected "panic: Could not find bindata asset file: data/status_shortcuts.sh\n\ngoroutine 1 [running]:\ngithub...o/src/github.com/mroth/scmpuff/main.go:44 +0x17c\nbash: line 2: scmpuff_status: command not found\n" to include "No changes (working directory clean)" | |
Diff: | |
@@ -1,2 +1,19 @@ | |
-No changes (working directory clean) | |
+panic: Could not find bindata asset file: data/status_shortcuts.sh | |
+ | |
+goroutine 1 [running]: | |
+github.com/mroth/scmpuff/commands/inits.assetString(0x5c96ba, 0x18, 0x0, 0x0) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:34 +0x15d | |
+github.com/mroth/scmpuff/commands/inits.printScript() | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:16 +0x191 | |
+github.com/mroth/scmpuff/commands/inits.CommandInit.func1(0xc4200f0000, 0xc42008e530, 0x0, 0x1) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/init.go:29 +0x31 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).execute(0xc4200f0000, 0xc42008e520, 0x1, 0x1, 0xc4200f0000, 0xc42008e520) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:650 +0x234 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x6c6d00, 0x0, 0xc4200f0480, 0x6c6e58) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:737 +0x2d4 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).Execute(0x6c6d00, 0xc42005df50, 0x1) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:695 +0x2b | |
+main.main() | |
+ /home/aero/go/src/github.com/mroth/scmpuff/main.go:44 +0x17c | |
+bash: line 2: scmpuff_status: command not found | |
(RSpec::Expectations::ExpectationNotMetError) | |
features/shell_functions.feature:40:in `And the output should contain "No changes (working directory clean)"' | |
| zsh | | |
expected "panic: Could not find bindata asset file: data/status_shortcuts.sh\n\ngoroutine 1 [running]:\ngithub...me/aero/go/src/github.com/mroth/scmpuff/main.go:44 +0x17c\nzsh: command not found: scmpuff_status\n" to include "No changes (working directory clean)" | |
Diff: | |
@@ -1,2 +1,19 @@ | |
-No changes (working directory clean) | |
+panic: Could not find bindata asset file: data/status_shortcuts.sh | |
+ | |
+goroutine 1 [running]: | |
+github.com/mroth/scmpuff/commands/inits.assetString(0x5c96ba, 0x18, 0x0, 0x0) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:34 +0x15d | |
+github.com/mroth/scmpuff/commands/inits.printScript() | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:16 +0x191 | |
+github.com/mroth/scmpuff/commands/inits.CommandInit.func1(0xc4200d6000, 0xc42004e540, 0x0, 0x1) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/init.go:29 +0x31 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).execute(0xc4200d6000, 0xc42004e530, 0x1, 0x1, 0xc4200d6000, 0xc42004e530) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:650 +0x234 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x6c6d00, 0x0, 0xc4200d6480, 0x6c6e58) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:737 +0x2d4 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).Execute(0x6c6d00, 0xc42005df50, 0x1) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:695 +0x2b | |
+main.main() | |
+ /home/aero/go/src/github.com/mroth/scmpuff/main.go:44 +0x17c | |
+zsh: command not found: scmpuff_status | |
(RSpec::Expectations::ExpectationNotMetError) | |
features/shell_functions.feature:40:in `And the output should contain "No changes (working directory clean)"' | |
Scenario Outline: Sets proper environment variables in shell # features/shell_functions.feature:46 | |
Given I am in a complex working tree status matching scm_breeze tests # features/step_definitions/scmpuff_steps.rb:43 | |
And the scmpuff environment variables have been cleared # features/step_definitions/scmpuff_steps.rb:80 | |
When I run `<shell>` interactively # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:113 | |
And I type `eval "$(scmpuff init -s)"` # features/step_definitions/scmpuff_steps.rb:104 | |
And I type "scmpuff_status" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:117 | |
And I type `echo -e "e1:$e1\ne2:$e2\ne3:$e3\ne4:$e4\ne5:$e5\n"` # features/step_definitions/scmpuff_steps.rb:104 | |
And I type "exit" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:117 | |
Then the output should match /^e1:.*new_file$/ # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:180 | |
And the output should match /^e2:.*deleted_file$/ # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:180 | |
And the output should match /^e3:.*new_file$/ # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:180 | |
And the output should match /^e4:.*untracked_file$/ # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:180 | |
And the output should match /^e5:$/ # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:180 | |
Examples: | |
| shell | | |
| bash | | |
expected "[master (root-commit) 6166ff4] Test commit\n 1 file changed, 0 insertions(+), 0 deletions(-)\n creat...o/src/github.com/mroth/scmpuff/main.go:44 +0x17c\nbash: line 2: scmpuff_status: command not found\n" to match /^e1:.*new_file$/m | |
Diff: | |
@@ -1,2 +1,28 @@ | |
-/^e1:.*new_file$/m | |
+[master (root-commit) 6166ff4] Test commit | |
+ 1 file changed, 0 insertions(+), 0 deletions(-) | |
+ create mode 100644 deleted_file | |
+e1: | |
+e2: | |
+e3: | |
+e4: | |
+e5: | |
+ | |
+panic: Could not find bindata asset file: data/status_shortcuts.sh | |
+ | |
+goroutine 1 [running]: | |
+github.com/mroth/scmpuff/commands/inits.assetString(0x5c96ba, 0x18, 0x0, 0x0) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:34 +0x15d | |
+github.com/mroth/scmpuff/commands/inits.printScript() | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:16 +0x191 | |
+github.com/mroth/scmpuff/commands/inits.CommandInit.func1(0xc4200ee000, 0xc42008e530, 0x0, 0x1) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/init.go:29 +0x31 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).execute(0xc4200ee000, 0xc42008e520, 0x1, 0x1, 0xc4200ee000, 0xc42008e520) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:650 +0x234 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x6c6d00, 0x0, 0xc4200ee480, 0x6c6e58) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:737 +0x2d4 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).Execute(0x6c6d00, 0xc42005df50, 0x1) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:695 +0x2b | |
+main.main() | |
+ /home/aero/go/src/github.com/mroth/scmpuff/main.go:44 +0x17c | |
+bash: line 2: scmpuff_status: command not found | |
(RSpec::Expectations::ExpectationNotMetError) | |
features/shell_functions.feature:54:in `Then the output should match /^e1:.*new_file$/' | |
| zsh | | |
expected "[master (root-commit) 2d2825f] Test commit\n 1 file changed, 0 insertions(+), 0 deletions(-)\n creat...me/aero/go/src/github.com/mroth/scmpuff/main.go:44 +0x17c\nzsh: command not found: scmpuff_status\n" to match /^e1:.*new_file$/m | |
Diff: | |
@@ -1,2 +1,28 @@ | |
-/^e1:.*new_file$/m | |
+[master (root-commit) 2d2825f] Test commit | |
+ 1 file changed, 0 insertions(+), 0 deletions(-) | |
+ create mode 100644 deleted_file | |
+e1: | |
+e2: | |
+e3: | |
+e4: | |
+e5: | |
+ | |
+panic: Could not find bindata asset file: data/status_shortcuts.sh | |
+ | |
+goroutine 1 [running]: | |
+github.com/mroth/scmpuff/commands/inits.assetString(0x5c96ba, 0x18, 0x0, 0x0) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:34 +0x15d | |
+github.com/mroth/scmpuff/commands/inits.printScript() | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:16 +0x191 | |
+github.com/mroth/scmpuff/commands/inits.CommandInit.func1(0xc4200ee000, 0xc42008e530, 0x0, 0x1) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/init.go:29 +0x31 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).execute(0xc4200ee000, 0xc42008e520, 0x1, 0x1, 0xc4200ee000, 0xc42008e520) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:650 +0x234 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x6c6d00, 0x0, 0xc4200ee480, 0x6c6e58) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:737 +0x2d4 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).Execute(0x6c6d00, 0xc42005df50, 0x1) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:695 +0x2b | |
+main.main() | |
+ /home/aero/go/src/github.com/mroth/scmpuff/main.go:44 +0x17c | |
+zsh: command not found: scmpuff_status | |
(RSpec::Expectations::ExpectationNotMetError) | |
features/shell_functions.feature:54:in `Then the output should match /^e1:.*new_file$/' | |
Scenario Outline: Sets proper environment variables in shell with weird filenames # features/shell_functions.feature:64 | |
Given I am in a git repository # features/step_definitions/scmpuff_steps.rb:17 | |
And an empty file named "aa bb" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:42 | |
And an empty file named "bb|cc" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:42 | |
And an empty file named "cc*dd" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:42 | |
When I run `<shell>` interactively # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:113 | |
And I type `eval "$(scmpuff init -s)"` # features/step_definitions/scmpuff_steps.rb:104 | |
And I type "scmpuff_status" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:117 | |
And I type `echo -e "e1:$e1\ne2:$e2\ne3:$e3\ne4:$e4\n"` # features/step_definitions/scmpuff_steps.rb:104 | |
And I type "exit" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:117 | |
Then the output should match /^e1:.*aa bb$/ # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:180 | |
And the output should match /^e2:.*bb\|cc$/ # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:180 | |
And the output should match /^e3:.*cc\*dd$/ # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:180 | |
And the output should match /^e4:$/ # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:180 | |
Examples: | |
| shell | | |
| bash | | |
expected "e1:/home/aero/go/src/github.com/mroth/scmpuff/commands/status/process.go\ne2:/home/aero/go/src/githu...o/src/github.com/mroth/scmpuff/main.go:44 +0x17c\nbash: line 2: scmpuff_status: command not found\n" to match /^e1:.*aa bb$/m | |
Diff: | |
@@ -1,2 +1,24 @@ | |
-/^e1:.*aa bb$/m | |
+e1:/home/aero/go/src/github.com/mroth/scmpuff/commands/status/process.go | |
+e2:/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/bindata.go | |
+e3:/home/aero/go/src/github.com/mroth/scmpuff/vendor/bundle | |
+e4: | |
+ | |
+panic: Could not find bindata asset file: data/status_shortcuts.sh | |
+ | |
+goroutine 1 [running]: | |
+github.com/mroth/scmpuff/commands/inits.assetString(0x5c96ba, 0x18, 0x0, 0x0) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:34 +0x15d | |
+github.com/mroth/scmpuff/commands/inits.printScript() | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:16 +0x191 | |
+github.com/mroth/scmpuff/commands/inits.CommandInit.func1(0xc4200ee000, 0xc42008e530, 0x0, 0x1) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/init.go:29 +0x31 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).execute(0xc4200ee000, 0xc42008e520, 0x1, 0x1, 0xc4200ee000, 0xc42008e520) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:650 +0x234 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x6c6d00, 0x0, 0xc4200ee480, 0x6c6e58) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:737 +0x2d4 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).Execute(0x6c6d00, 0xc42005df50, 0x1) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:695 +0x2b | |
+main.main() | |
+ /home/aero/go/src/github.com/mroth/scmpuff/main.go:44 +0x17c | |
+bash: line 2: scmpuff_status: command not found | |
(RSpec::Expectations::ExpectationNotMetError) | |
features/shell_functions.feature:74:in `Then the output should match /^e1:.*aa bb$/' | |
| zsh | | |
expected "e1:/home/aero/go/src/github.com/mroth/scmpuff/commands/status/process.go\ne2:/home/aero/go/src/githu...me/aero/go/src/github.com/mroth/scmpuff/main.go:44 +0x17c\nzsh: command not found: scmpuff_status\n" to match /^e1:.*aa bb$/m | |
Diff: | |
@@ -1,2 +1,24 @@ | |
-/^e1:.*aa bb$/m | |
+e1:/home/aero/go/src/github.com/mroth/scmpuff/commands/status/process.go | |
+e2:/home/aero/go/src/github.com/mroth/scmpuff/commands/inits/bindata.go | |
+e3:/home/aero/go/src/github.com/mroth/scmpuff/vendor/bundle | |
+e4: | |
+ | |
+panic: Could not find bindata asset file: data/status_shortcuts.sh | |
+ | |
+goroutine 1 [running]: | |
+github.com/mroth/scmpuff/commands/inits.assetString(0x5c96ba, 0x18, 0x0, 0x0) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:34 +0x15d | |
+github.com/mroth/scmpuff/commands/inits.printScript() | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:16 +0x191 | |
+github.com/mroth/scmpuff/commands/inits.CommandInit.func1(0xc4200c8000, 0xc42004e540, 0x0, 0x1) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/init.go:29 +0x31 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).execute(0xc4200c8000, 0xc42004e530, 0x1, 0x1, 0xc4200c8000, 0xc42004e530) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:650 +0x234 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x6c6d00, 0x0, 0xc4200c8480, 0x6c6e58) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:737 +0x2d4 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).Execute(0x6c6d00, 0xc42005df50, 0x1) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:695 +0x2b | |
+main.main() | |
+ /home/aero/go/src/github.com/mroth/scmpuff/main.go:44 +0x17c | |
+zsh: command not found: scmpuff_status | |
(RSpec::Expectations::ExpectationNotMetError) | |
features/shell_functions.feature:74:in `Then the output should match /^e1:.*aa bb$/' | |
Scenario Outline: Clears extra environment variables from before # features/shell_functions.feature:83 | |
Given I am in a complex working tree status matching scm_breeze tests # features/step_definitions/scmpuff_steps.rb:43 | |
And the scmpuff environment variables have been cleared # features/step_definitions/scmpuff_steps.rb:80 | |
When I run `<shell>` interactively # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:113 | |
And I type `eval "$(scmpuff init -s)"` # features/step_definitions/scmpuff_steps.rb:104 | |
And I type "scmpuff_status" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:117 | |
And I type "git add new_file" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:117 | |
And I type "git commit -m 'so be it'" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:117 | |
And I type "scmpuff_status" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:117 | |
And I type `echo -e "e1:$e1\ne2:$e2\ne3:$e3\ne4:$e4\ne5:$e5\n"` # features/step_definitions/scmpuff_steps.rb:104 | |
And I type "exit" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:117 | |
Then the output should match /^e1:.*deleted_file$/ # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:180 | |
And the output should match /^e2:.*untracked_file$/ # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:180 | |
And the output should match /^e3:$/ # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:180 | |
And the output should match /^e4:$/ # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:180 | |
And the output should match /^e5:$/ # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:180 | |
Examples: | |
| shell | | |
| bash | | |
expected "[master (root-commit) 2e8b398] Test commit\n 1 file changed, 0 insertions(+), 0 deletions(-)\n creat...nbash: line 2: scmpuff_status: command not found\nbash: line 5: scmpuff_status: command not found\n" to match /^e1:.*deleted_file$/m | |
Diff: | |
@@ -1,2 +1,32 @@ | |
-/^e1:.*deleted_file$/m | |
+[master (root-commit) 2e8b398] Test commit | |
+ 1 file changed, 0 insertions(+), 0 deletions(-) | |
+ create mode 100644 deleted_file | |
+[master 606d3bf] so be it | |
+ 1 file changed, 1 insertion(+) | |
+ create mode 100644 new_file | |
+e1: | |
+e2: | |
+e3: | |
+e4: | |
+e5: | |
+ | |
+panic: Could not find bindata asset file: data/status_shortcuts.sh | |
+ | |
+goroutine 1 [running]: | |
+github.com/mroth/scmpuff/commands/inits.assetString(0x5c96ba, 0x18, 0x0, 0x0) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:34 +0x15d | |
+github.com/mroth/scmpuff/commands/inits.printScript() | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:16 +0x191 | |
+github.com/mroth/scmpuff/commands/inits.CommandInit.func1(0xc4200ee000, 0xc42008e530, 0x0, 0x1) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/init.go:29 +0x31 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).execute(0xc4200ee000, 0xc42008e520, 0x1, 0x1, 0xc4200ee000, 0xc42008e520) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:650 +0x234 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x6c6d00, 0x0, 0xc4200ee480, 0x6c6e58) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:737 +0x2d4 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).Execute(0x6c6d00, 0xc42005df50, 0x1) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:695 +0x2b | |
+main.main() | |
+ /home/aero/go/src/github.com/mroth/scmpuff/main.go:44 +0x17c | |
+bash: line 2: scmpuff_status: command not found | |
+bash: line 5: scmpuff_status: command not found | |
(RSpec::Expectations::ExpectationNotMetError) | |
features/shell_functions.feature:94:in `Then the output should match /^e1:.*deleted_file$/' | |
| zsh | | |
expected "[master (root-commit) 5c67153] Test commit\n 1 file changed, 0 insertions(+), 0 deletions(-)\n creat...main.go:44 +0x17c\nzsh: command not found: scmpuff_status\nzsh: command not found: scmpuff_status\n" to match /^e1:.*deleted_file$/m | |
Diff: | |
@@ -1,2 +1,32 @@ | |
-/^e1:.*deleted_file$/m | |
+[master (root-commit) 5c67153] Test commit | |
+ 1 file changed, 0 insertions(+), 0 deletions(-) | |
+ create mode 100644 deleted_file | |
+[master 030a2fd] so be it | |
+ 1 file changed, 1 insertion(+) | |
+ create mode 100644 new_file | |
+e1: | |
+e2: | |
+e3: | |
+e4: | |
+e5: | |
+ | |
+panic: Could not find bindata asset file: data/status_shortcuts.sh | |
+ | |
+goroutine 1 [running]: | |
+github.com/mroth/scmpuff/commands/inits.assetString(0x5c96ba, 0x18, 0x0, 0x0) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:34 +0x15d | |
+github.com/mroth/scmpuff/commands/inits.printScript() | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:16 +0x191 | |
+github.com/mroth/scmpuff/commands/inits.CommandInit.func1(0xc4200d6000, 0xc42004e540, 0x0, 0x1) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/init.go:29 +0x31 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).execute(0xc4200d6000, 0xc42004e530, 0x1, 0x1, 0xc4200d6000, 0xc42004e530) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:650 +0x234 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x6c6d00, 0x0, 0xc4200d6480, 0x6c6e58) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:737 +0x2d4 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).Execute(0x6c6d00, 0xc42005df50, 0x1) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:695 +0x2b | |
+main.main() | |
+ /home/aero/go/src/github.com/mroth/scmpuff/main.go:44 +0x17c | |
+zsh: command not found: scmpuff_status | |
+zsh: command not found: scmpuff_status | |
(RSpec::Expectations::ExpectationNotMetError) | |
features/shell_functions.feature:94:in `Then the output should match /^e1:.*deleted_file$/' | |
Feature: optional wrapping of normal git cmds in the shell | |
In order to verify the shell git wrappers work correctly | |
I want to make sure they intercept and wrap naked git commands properly | |
Background: # features/shell_wrappers.feature:5 | |
Given a mocked home directory # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:363 | |
Scenario Outline: Wrapped `git add` adds by number and echos status after # features/shell_wrappers.feature:8 | |
Given I am in a git repository # features/step_definitions/scmpuff_steps.rb:17 | |
And a 4 byte file named "foo.bar" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:38 | |
And a 4 byte file named "bar.foo" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:38 | |
When I run `<shell>` interactively # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:113 | |
And I type `eval "$(scmpuff init -ws)"` # features/step_definitions/scmpuff_steps.rb:104 | |
And I type "scmpuff_status" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:117 | |
And I type "git add 1" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:117 | |
And I type "exit" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:117 | |
Then the output should contain: # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:156 | |
""" | |
# On branch: master | [*] => $e* | |
# | |
➤ Changes to be committed | |
# | |
# new file: [1] bar.foo | |
# | |
➤ Untracked files | |
# | |
# untracked: [2] foo.bar | |
# | |
""" | |
Examples: | |
| shell | | |
| bash | | |
expected "panic: Could not find bindata asset file: data/status_shortcuts.sh\n\ngoroutine 1 [running]:\ngithub...17c\nbash: line 2: scmpuff_status: command not found\nfatal: pathspec '1' did not match any files\n" to include "# On branch: master | [*] => $e*\n#\n➤ Changes to be committed\n#\n# new file: [1] bar.foo\n#\n➤ Untracked files\n#\n# untracked: [2] foo.bar\n#" | |
Diff: | |
@@ -1,2 +1,20 @@ | |
-# On branch: master | [*] => $e*\n#\n➤ Changes to be committed\n#\n# new file: [1] bar.foo\n#\n➤ Untracked files\n#\n# untracked: [2] foo.bar\n# | |
+panic: Could not find bindata asset file: data/status_shortcuts.sh | |
+ | |
+goroutine 1 [running]: | |
+github.com/mroth/scmpuff/commands/inits.assetString(0x5c96ba, 0x18, 0x0, 0x0) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:34 +0x15d | |
+github.com/mroth/scmpuff/commands/inits.printScript() | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:16 +0x191 | |
+github.com/mroth/scmpuff/commands/inits.CommandInit.func1(0xc4200fe000, 0xc420094530, 0x0, 0x1) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/init.go:29 +0x31 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).execute(0xc4200fe000, 0xc420094520, 0x1, 0x1, 0xc4200fe000, 0xc420094520) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:650 +0x234 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x6c6d00, 0x0, 0xc4200fe480, 0x6c6e58) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:737 +0x2d4 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).Execute(0x6c6d00, 0xc42005df50, 0x1) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:695 +0x2b | |
+main.main() | |
+ /home/aero/go/src/github.com/mroth/scmpuff/main.go:44 +0x17c | |
+bash: line 2: scmpuff_status: command not found | |
+fatal: pathspec '1' did not match any files | |
(RSpec::Expectations::ExpectationNotMetError) | |
features/shell_wrappers.feature:17:in `Then the output should contain:' | |
| zsh | | |
expected "panic: Could not find bindata asset file: data/status_shortcuts.sh\n\ngoroutine 1 [running]:\ngithub...go:44 +0x17c\nzsh: command not found: scmpuff_status\nfatal: pathspec '1' did not match any files\n" to include "# On branch: master | [*] => $e*\n#\n➤ Changes to be committed\n#\n# new file: [1] bar.foo\n#\n➤ Untracked files\n#\n# untracked: [2] foo.bar\n#" | |
Diff: | |
@@ -1,2 +1,20 @@ | |
-# On branch: master | [*] => $e*\n#\n➤ Changes to be committed\n#\n# new file: [1] bar.foo\n#\n➤ Untracked files\n#\n# untracked: [2] foo.bar\n# | |
+panic: Could not find bindata asset file: data/status_shortcuts.sh | |
+ | |
+goroutine 1 [running]: | |
+github.com/mroth/scmpuff/commands/inits.assetString(0x5c96ba, 0x18, 0x0, 0x0) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:34 +0x15d | |
+github.com/mroth/scmpuff/commands/inits.printScript() | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:16 +0x191 | |
+github.com/mroth/scmpuff/commands/inits.CommandInit.func1(0xc4200ee000, 0xc42008e530, 0x0, 0x1) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/init.go:29 +0x31 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).execute(0xc4200ee000, 0xc42008e520, 0x1, 0x1, 0xc4200ee000, 0xc42008e520) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:650 +0x234 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x6c6d00, 0x0, 0xc4200ee480, 0x6c6e58) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:737 +0x2d4 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).Execute(0x6c6d00, 0xc42005df50, 0x1) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:695 +0x2b | |
+main.main() | |
+ /home/aero/go/src/github.com/mroth/scmpuff/main.go:44 +0x17c | |
+zsh: command not found: scmpuff_status | |
+fatal: pathspec '1' did not match any files | |
(RSpec::Expectations::ExpectationNotMetError) | |
features/shell_wrappers.feature:17:in `Then the output should contain:' | |
Scenario Outline: Wrapped `git add` can handle files with spaces properly # features/shell_wrappers.feature:36 | |
Given I am in a git repository # features/step_definitions/scmpuff_steps.rb:17 | |
And an empty file named "file with spaces.txt" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:42 | |
When I run `<shell>` interactively # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:113 | |
And I type `eval "$(scmpuff init -ws)"` # features/step_definitions/scmpuff_steps.rb:104 | |
And I type "scmpuff_status" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:117 | |
And I type "git add 1" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:117 | |
And I type "exit" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:117 | |
Then the exit status should be 0 # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:197 | |
And the output should match /new file:\s+\[1\] file with spaces.txt/ # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:180 | |
Examples: | |
| shell | | |
| bash | | |
expected "panic: Could not find bindata asset file: data/status_shortcuts.sh\n\ngoroutine 1 [running]:\ngithub...17c\nbash: line 2: scmpuff_status: command not found\nfatal: pathspec '1' did not match any files\n" to match /new file:\s+\[1\] file with spaces.txt/m | |
Diff: | |
@@ -1,2 +1,20 @@ | |
-/new file:\s+\[1\] file with spaces.txt/m | |
+panic: Could not find bindata asset file: data/status_shortcuts.sh | |
+ | |
+goroutine 1 [running]: | |
+github.com/mroth/scmpuff/commands/inits.assetString(0x5c96ba, 0x18, 0x0, 0x0) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:34 +0x15d | |
+github.com/mroth/scmpuff/commands/inits.printScript() | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:16 +0x191 | |
+github.com/mroth/scmpuff/commands/inits.CommandInit.func1(0xc4200d6000, 0xc42004e540, 0x0, 0x1) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/init.go:29 +0x31 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).execute(0xc4200d6000, 0xc42004e530, 0x1, 0x1, 0xc4200d6000, 0xc42004e530) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:650 +0x234 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x6c6d00, 0x0, 0xc4200d6480, 0x6c6e58) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:737 +0x2d4 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).Execute(0x6c6d00, 0xc42005df50, 0x1) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:695 +0x2b | |
+main.main() | |
+ /home/aero/go/src/github.com/mroth/scmpuff/main.go:44 +0x17c | |
+bash: line 2: scmpuff_status: command not found | |
+fatal: pathspec '1' did not match any files | |
(RSpec::Expectations::ExpectationNotMetError) | |
features/shell_wrappers.feature:45:in `And the output should match /new file:\s+\[1\] file with spaces.txt/' | |
| zsh | | |
expected "panic: Could not find bindata asset file: data/status_shortcuts.sh\n\ngoroutine 1 [running]:\ngithub...go:44 +0x17c\nzsh: command not found: scmpuff_status\nfatal: pathspec '1' did not match any files\n" to match /new file:\s+\[1\] file with spaces.txt/m | |
Diff: | |
@@ -1,2 +1,20 @@ | |
-/new file:\s+\[1\] file with spaces.txt/m | |
+panic: Could not find bindata asset file: data/status_shortcuts.sh | |
+ | |
+goroutine 1 [running]: | |
+github.com/mroth/scmpuff/commands/inits.assetString(0x5c96ba, 0x18, 0x0, 0x0) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:34 +0x15d | |
+github.com/mroth/scmpuff/commands/inits.printScript() | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/scripts.go:16 +0x191 | |
+github.com/mroth/scmpuff/commands/inits.CommandInit.func1(0xc4200ee000, 0xc42008e530, 0x0, 0x1) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/commands/inits/init.go:29 +0x31 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).execute(0xc4200ee000, 0xc42008e520, 0x1, 0x1, 0xc4200ee000, 0xc42008e520) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:650 +0x234 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x6c6d00, 0x0, 0xc4200ee480, 0x6c6e58) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:737 +0x2d4 | |
+github.com/mroth/scmpuff/vendor/github.com/spf13/cobra.(*Command).Execute(0x6c6d00, 0xc42005df50, 0x1) | |
+ /home/aero/go/src/github.com/mroth/scmpuff/vendor/github.com/spf13/cobra/command.go:695 +0x2b | |
+main.main() | |
+ /home/aero/go/src/github.com/mroth/scmpuff/main.go:44 +0x17c | |
+zsh: command not found: scmpuff_status | |
+fatal: pathspec '1' did not match any files | |
(RSpec::Expectations::ExpectationNotMetError) | |
features/shell_wrappers.feature:45:in `And the output should match /new file:\s+\[1\] file with spaces.txt/' | |
Scenario Outline: Wrapped `git reset` can handle files with spaces properly # features/shell_wrappers.feature:52 | |
This is different and more complex because `git status --porcelain` puts it | |
inside quotes for the case where it is already added (but doesnt in the ?? | |
case surprisingly), and also it expands using --relative. | |
Given I am in a git repository # features/step_definitions/scmpuff_steps.rb:17 | |
And an empty file named "file with spaces.txt" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:42 | |
And I successfully run `git add "file with spaces.txt"` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:104 | |
When I run `<shell>` interactively # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:113 | |
And I type `eval "$(scmpuff init -ws)"` # features/step_definitions/scmpuff_steps.rb:104 | |
And I type "scmpuff_status" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:117 | |
And I type "git reset 1" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:117 | |
And I type "exit" # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:117 | |
Then the exit status should be 0 # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:197 | |
When I run `scmpuff status` # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:93 | |
Then the stdout from "scmpuff status" should contain: # vendor/bundle/ruby/2.5.0/gems/aruba-0.6.2/lib/aruba/cucumber.rb:258 | |
""" | |
untracked: [1] file with spaces.txt | |
""" | |
Examples: | |
| shell | | |
| bash | | |
expected "# On branch: master | [*] => $e*\n#\n➤ Changes to be committed\n#\n# new file: [1] file with spaces.txt\n#\n" to include "untracked: [1] file with spaces.txt" | |
Diff: | |
@@ -1,2 +1,7 @@ | |
-untracked: [1] file with spaces.txt | |
+# On branch: master | [*] => $e* | |
+# | |
+➤ Changes to be committed | |
+# | |
+# new file: [1] file with spaces.txt | |
+# | |
(RSpec::Expectations::ExpectationNotMetError) | |
features/shell_wrappers.feature:67:in `Then the stdout from "scmpuff status" should contain:' | |
| zsh | | |
expected "# On branch: master | [*] => $e*\n#\n➤ Changes to be committed\n#\n# new file: [1] file with spaces.txt\n#\n" to include "untracked: [1] file with spaces.txt" | |
Diff: | |
@@ -1,2 +1,7 @@ | |
-untracked: [1] file with spaces.txt | |
+# On branch: master | [*] => $e* | |
+# | |
+➤ Changes to be committed | |
+# | |
+# new file: [1] file with spaces.txt | |
+# | |
(RSpec::Expectations::ExpectationNotMetError) | |
features/shell_wrappers.feature:67:in `Then the stdout from "scmpuff status" should contain:' | |
Failing Scenarios: | |
cucumber features/command_init.feature:6 # Scenario: init -s should contain status shortcuts | |
cucumber features/command_init.feature:10 # Scenario: --aliases controls short aliases in output (default: yes) | |
cucumber features/command_init.feature:10 # Scenario: --aliases controls short aliases in output (default: yes) | |
cucumber features/command_init.feature:10 # Scenario: --aliases controls short aliases in output (default: yes) | |
cucumber features/command_init.feature:10 # Scenario: --aliases controls short aliases in output (default: yes) | |
cucumber features/command_init.feature:10 # Scenario: --aliases controls short aliases in output (default: yes) | |
cucumber features/command_init.feature:22 # Scenario: --wrap controls git cmd wrapping in output (default: yes) | |
cucumber features/command_init.feature:22 # Scenario: --wrap controls git cmd wrapping in output (default: yes) | |
cucumber features/command_init.feature:22 # Scenario: --wrap controls git cmd wrapping in output (default: yes) | |
cucumber features/command_init.feature:22 # Scenario: --wrap controls git cmd wrapping in output (default: yes) | |
cucumber features/command_init.feature:22 # Scenario: --wrap controls git cmd wrapping in output (default: yes) | |
cucumber features/command_init.feature:33 # Scenario: Evaling init -s defines status shortcuts in environment | |
cucumber features/command_init.feature:33 # Scenario: Evaling init -s defines status shortcuts in environment | |
cucumber features/shell_functions.feature:10 # Scenario: Handle error conditions from wrapped binary command | |
It is possible for the underlying `scmpuff status` command wrapped by our | |
shell function to produce errors, for example, when not in a git repository. | |
In keeping with the design theory of this program (handle as much as | |
possible in the binary), we want to make sure those error messages are | |
propogated to the user and not swallowed by the shell function, and that | |
non-zero exit codes from the underlying process are preserved. | |
cucumber features/shell_functions.feature:10 # Scenario: Handle error conditions from wrapped binary command | |
It is possible for the underlying `scmpuff status` command wrapped by our | |
shell function to produce errors, for example, when not in a git repository. | |
In keeping with the design theory of this program (handle as much as | |
possible in the binary), we want to make sure those error messages are | |
propogated to the user and not swallowed by the shell function, and that | |
non-zero exit codes from the underlying process are preserved. | |
cucumber features/shell_functions.feature:33 # Scenario: Basic functionality works with shell wrapper. | |
cucumber features/shell_functions.feature:33 # Scenario: Basic functionality works with shell wrapper. | |
cucumber features/shell_functions.feature:46 # Scenario: Sets proper environment variables in shell | |
cucumber features/shell_functions.feature:46 # Scenario: Sets proper environment variables in shell | |
cucumber features/shell_functions.feature:64 # Scenario: Sets proper environment variables in shell with weird filenames | |
cucumber features/shell_functions.feature:64 # Scenario: Sets proper environment variables in shell with weird filenames | |
cucumber features/shell_functions.feature:83 # Scenario: Clears extra environment variables from before | |
cucumber features/shell_functions.feature:83 # Scenario: Clears extra environment variables from before | |
cucumber features/shell_wrappers.feature:8 # Scenario: Wrapped `git add` adds by number and echos status after | |
cucumber features/shell_wrappers.feature:8 # Scenario: Wrapped `git add` adds by number and echos status after | |
cucumber features/shell_wrappers.feature:36 # Scenario: Wrapped `git add` can handle files with spaces properly | |
cucumber features/shell_wrappers.feature:36 # Scenario: Wrapped `git add` can handle files with spaces properly | |
cucumber features/shell_wrappers.feature:52 # Scenario: Wrapped `git reset` can handle files with spaces properly | |
This is different and more complex because `git status --porcelain` puts it | |
inside quotes for the case where it is already added (but doesnt in the ?? | |
case surprisingly), and also it expands using --relative. | |
cucumber features/shell_wrappers.feature:52 # Scenario: Wrapped `git reset` can handle files with spaces properly | |
This is different and more complex because `git status --porcelain` puts it | |
inside quotes for the case where it is already added (but doesnt in the ?? | |
case surprisingly), and also it expands using --relative. | |
60 scenarios (29 failed, 31 passed) | |
497 steps (29 failed, 40 skipped, 428 passed) | |
0m19.607s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment