eac_git 0.18.1 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. checksums.yaml +4 -4
  2. data/lib/eac_git/local/changed_file.rb +2 -2
  3. data/lib/eac_git/local/commit/diff_tree_line.rb +1 -1
  4. data/lib/eac_git/local/remote.rb +32 -8
  5. data/lib/eac_git/local/subrepo/config.rb +2 -0
  6. data/lib/eac_git/local.rb +2 -2
  7. data/lib/eac_git/remote_like/ls_result.rb +1 -1
  8. data/lib/eac_git/remote_like.rb +0 -1
  9. data/lib/eac_git/rspec/stubbed_git_local_repo.rb +0 -2
  10. data/lib/eac_git/rspec.rb +0 -1
  11. data/lib/eac_git/version.rb +1 -1
  12. data/lib/eac_git.rb +0 -2
  13. data/vendor/git-subrepo/.fish.rc +20 -0
  14. data/vendor/git-subrepo/.gitattributes +1 -0
  15. data/vendor/git-subrepo/.github/workflows/test.yml +29 -0
  16. data/vendor/git-subrepo/.gitignore +1 -0
  17. data/vendor/git-subrepo/.gitrepo +7 -0
  18. data/vendor/git-subrepo/.rc +32 -0
  19. data/vendor/git-subrepo/Changes +66 -0
  20. data/vendor/git-subrepo/Intro.pod +2 -5
  21. data/vendor/git-subrepo/Makefile +45 -5
  22. data/vendor/git-subrepo/Meta +2 -2
  23. data/vendor/git-subrepo/ReadMe.pod +26 -31
  24. data/vendor/git-subrepo/doc/git-subrepo.swim +22 -18
  25. data/vendor/git-subrepo/doc/intro-to-subrepo.swim +2 -4
  26. data/vendor/git-subrepo/ext/bashplus/.gitrepo +12 -0
  27. data/vendor/git-subrepo/ext/bashplus/.travis.yml +6 -0
  28. data/vendor/git-subrepo/ext/bashplus/Changes +19 -0
  29. data/vendor/git-subrepo/ext/bashplus/License +1 -1
  30. data/vendor/git-subrepo/ext/bashplus/Makefile +25 -0
  31. data/vendor/git-subrepo/ext/bashplus/Meta +4 -4
  32. data/vendor/git-subrepo/ext/bashplus/ReadMe.pod +2 -2
  33. data/vendor/git-subrepo/ext/bashplus/bin/bash+ +8 -7
  34. data/vendor/git-subrepo/ext/bashplus/doc/bash+.swim +1 -1
  35. data/vendor/git-subrepo/ext/bashplus/lib/bash+.bash +85 -38
  36. data/vendor/git-subrepo/ext/bashplus/man/man1/bash+.1 +8 -8
  37. data/vendor/git-subrepo/ext/bashplus/man/man3/bash+.3 +8 -8
  38. data/vendor/git-subrepo/ext/bashplus/test/base.t +4 -5
  39. data/vendor/git-subrepo/ext/bashplus/test/die.t +16 -0
  40. data/vendor/git-subrepo/ext/bashplus/test/fcopy.t +2 -3
  41. data/vendor/git-subrepo/ext/bashplus/test/{test.bash → setup} +18 -8
  42. data/vendor/git-subrepo/ext/bashplus/test/shellcheck.t +37 -0
  43. data/vendor/git-subrepo/ext/bashplus/test/source-bash+-std.t +10 -11
  44. data/vendor/git-subrepo/ext/bashplus/test/source-bash+.t +10 -11
  45. data/vendor/git-subrepo/ext/bashplus/test/use.t +8 -5
  46. data/vendor/git-subrepo/ext/bashplus/test/version-check.t +23 -0
  47. data/vendor/git-subrepo/ext/test-more-bash/.gitrepo +12 -0
  48. data/vendor/git-subrepo/ext/test-more-bash/.travis.yml +6 -0
  49. data/vendor/git-subrepo/ext/test-more-bash/Changes +11 -0
  50. data/vendor/git-subrepo/ext/test-more-bash/License +1 -1
  51. data/vendor/git-subrepo/ext/test-more-bash/Makefile +25 -0
  52. data/vendor/git-subrepo/ext/test-more-bash/Meta +5 -5
  53. data/vendor/git-subrepo/ext/test-more-bash/ReadMe.pod +9 -3
  54. data/vendor/git-subrepo/ext/test-more-bash/doc/test-more.swim +7 -2
  55. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/.gitrepo +12 -0
  56. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/.travis.yml +6 -0
  57. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/Changes +11 -0
  58. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/License +1 -1
  59. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/Makefile +25 -0
  60. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/Meta +3 -3
  61. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/ReadMe.pod +2 -2
  62. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/bin/bash+ +8 -7
  63. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/doc/bash+.swim +1 -1
  64. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/lib/bash+.bash +85 -38
  65. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/man/man1/bash+.1 +8 -8
  66. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/man/man3/bash+.3 +8 -8
  67. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/base.t +4 -4
  68. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/die.t +17 -0
  69. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/fcopy.t +2 -2
  70. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/{test.bash → setup} +17 -8
  71. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/shellcheck.t +38 -0
  72. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/source-bash+-std.t +10 -10
  73. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/source-bash+.t +10 -10
  74. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/use.t +8 -4
  75. data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/.gitrepo +12 -0
  76. data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/.travis.yml +5 -0
  77. data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/Changes +11 -0
  78. data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/License +1 -1
  79. data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/Makefile +30 -0
  80. data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/Meta +3 -3
  81. data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/ReadMe.pod +2 -2
  82. data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/doc/test-tap.swim +1 -1
  83. data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/lib/test/tap.bash +46 -42
  84. data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/man/man3/test-tap.3 +8 -8
  85. data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/bail_out.t +1 -1
  86. data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/fail.t +1 -1
  87. data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/fail_fast.t +1 -1
  88. data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/helper.bash +1 -1
  89. data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/shellcheck.t +42 -0
  90. data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/tap.t +11 -5
  91. data/vendor/git-subrepo/ext/test-more-bash/lib/test/more.bash +35 -15
  92. data/vendor/git-subrepo/ext/test-more-bash/man/man3/test-more.3 +16 -10
  93. data/vendor/git-subrepo/ext/test-more-bash/test/fail.t +15 -1
  94. data/vendor/git-subrepo/ext/test-more-bash/test/more.t +12 -4
  95. data/vendor/git-subrepo/ext/test-more-bash/test/setup +3 -3
  96. data/vendor/git-subrepo/ext/test-more-bash/test/shellcheck.t +35 -0
  97. data/vendor/git-subrepo/ext/test-more-bash/test/test/fail1.t +14 -1
  98. data/vendor/git-subrepo/lib/git-subrepo +375 -260
  99. data/vendor/git-subrepo/lib/git-subrepo.d/help-functions.bash +21 -22
  100. data/vendor/git-subrepo/man/man1/git-subrepo.1 +125 -141
  101. data/vendor/git-subrepo/pkg/bin/generate-completion.pl +0 -7
  102. data/vendor/git-subrepo/pkg/bin/generate-help-functions.pl +0 -2
  103. data/vendor/git-subrepo/share/completion.bash +1 -3
  104. data/vendor/git-subrepo/share/enable-completion.sh +3 -3
  105. data/vendor/git-subrepo/share/zsh-completion/_git-subrepo +2 -7
  106. data/vendor/git-subrepo/test/Dockerfile +112 -0
  107. data/vendor/git-subrepo/test/branch-all.t +6 -6
  108. data/vendor/git-subrepo/test/branch-rev-list-one-path.t +7 -8
  109. data/vendor/git-subrepo/test/branch-rev-list.t +7 -8
  110. data/vendor/git-subrepo/test/branch.t +9 -9
  111. data/vendor/git-subrepo/test/clean.t +3 -3
  112. data/vendor/git-subrepo/test/clone-annotated-tag.t +7 -7
  113. data/vendor/git-subrepo/test/clone.t +20 -25
  114. data/vendor/git-subrepo/test/config.t +7 -6
  115. data/vendor/git-subrepo/test/encode.t +17 -17
  116. data/vendor/git-subrepo/test/error.t +18 -18
  117. data/vendor/git-subrepo/test/fetch.t +4 -4
  118. data/vendor/git-subrepo/test/gitignore.t +8 -8
  119. data/vendor/git-subrepo/test/init.t +6 -7
  120. data/vendor/git-subrepo/test/issue29.t +3 -3
  121. data/vendor/git-subrepo/test/issue95.t +2 -2
  122. data/vendor/git-subrepo/test/issue96.t +3 -3
  123. data/vendor/git-subrepo/test/pull-all.t +5 -5
  124. data/vendor/git-subrepo/test/pull-merge.t +16 -15
  125. data/vendor/git-subrepo/test/pull-message.t +12 -12
  126. data/vendor/git-subrepo/test/pull-new-branch.t +8 -7
  127. data/vendor/git-subrepo/test/pull-ours.t +10 -10
  128. data/vendor/git-subrepo/test/pull-theirs.t +8 -8
  129. data/vendor/git-subrepo/test/pull-twice.t +4 -4
  130. data/vendor/git-subrepo/test/pull-worktree.t +5 -5
  131. data/vendor/git-subrepo/test/pull.t +14 -14
  132. data/vendor/git-subrepo/test/push-after-init.t +7 -6
  133. data/vendor/git-subrepo/test/push-after-push-no-changes.t +27 -0
  134. data/vendor/git-subrepo/test/push-force.t +7 -6
  135. data/vendor/git-subrepo/test/push-new-branch.t +10 -10
  136. data/vendor/git-subrepo/test/push-no-changes.t +3 -3
  137. data/vendor/git-subrepo/test/push-squash.t +7 -7
  138. data/vendor/git-subrepo/test/push.t +35 -34
  139. data/vendor/git-subrepo/test/rebase.t +63 -0
  140. data/vendor/git-subrepo/test/reclone.t +15 -8
  141. data/vendor/git-subrepo/test/setup +62 -55
  142. data/vendor/git-subrepo/test/shellcheck.t +37 -0
  143. data/vendor/git-subrepo/test/status.t +47 -27
  144. data/vendor/git-subrepo/test/submodule.t +4 -4
  145. data/vendor/git-subrepo/test/zsh.t +27 -0
  146. metadata +42 -22
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env bash
1
+ # shellcheck shell=bash
2
2
 
3
3
  #------------------------------------------------------------------------------
4
4
  # This is a tiny version of test-more-bash that I use here. test-more-bash uses
@@ -7,22 +7,28 @@
7
7
  # how nice Bash can be.
8
8
  #------------------------------------------------------------------------------
9
9
 
10
+ set -e -o pipefail
11
+
12
+ PATH=$PWD/bin:$PATH
13
+
14
+ run=0
15
+
10
16
  plan() {
11
17
  echo "1..$1"
12
18
  }
13
19
 
14
20
  pass() {
15
- let run=run+1
21
+ (( ++run ))
16
22
  echo "ok $run${1:+ - $1}"
17
23
  }
18
24
 
19
25
  fail() {
20
- let run=run+1
26
+ (( ++run ))
21
27
  echo "not ok $run${1:+ - $1}"
22
28
  }
23
29
 
24
30
  is() {
25
- if [ "$1" == "$2" ]; then
31
+ if [[ $1 == "$2" ]]; then
26
32
  pass "$3"
27
33
  else
28
34
  fail "$3"
@@ -32,13 +38,15 @@ is() {
32
38
  }
33
39
 
34
40
  ok() {
35
- (exit ${1:-$?}) &&
36
- pass "$2" ||
41
+ if (exit "${1:-$?}"); then
42
+ pass "$2"
43
+ else
37
44
  fail "$2"
45
+ fi
38
46
  }
39
47
 
40
48
  like() {
41
- if [[ "$1" =~ "$2" ]]; then
49
+ if [[ $1 =~ $2 ]]; then
42
50
  pass "$3"
43
51
  else
44
52
  fail "$3"
@@ -48,7 +56,7 @@ like() {
48
56
  }
49
57
 
50
58
  unlike() {
51
- if [[ ! "$1" =~ "$2" ]]; then
59
+ if [[ ! $1 =~ $2 ]]; then
52
60
  pass "$3"
53
61
  else
54
62
  fail "$3"
@@ -68,3 +76,5 @@ diag() {
68
76
  note() {
69
77
  echo "# ${1//$'\n'/$'\n'# }"
70
78
  }
79
+
80
+ #! vim: ft=sh sw=2:
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/env bash
2
+
3
+ source test/setup
4
+
5
+ source bash+
6
+
7
+ if ! command -v shellcheck >/dev/null; then
8
+ plan skip_all "The 'shellcheck' utility is not installed"
9
+ fi
10
+ if [[ ! $(shellcheck --version) =~ 0\.7\.1 ]]; then
11
+ plan skip_all "This test wants shellcheck version 0.7.1"
12
+ fi
13
+
14
+ IFS=$'\n' read -d '' -r -a shell_files <<< "$(
15
+ find bin -type f
16
+ find lib -type f
17
+ echo test/setup
18
+ find test -name '*.t'
19
+ )" || true
20
+
21
+ skips=(
22
+ # We want to keep these 2 here always:
23
+ SC1090 # Can't follow non-constant source. Use a directive to specify location.
24
+ SC1091 # Not following: bash+ was not specified as input (see shellcheck -x).
25
+ )
26
+
27
+ skip=$(IFS=,; echo "${skips[*]}")
28
+
29
+ for file in "${shell_files[@]}"; do
30
+ [[ $file == *swp ]] && continue
31
+ is "$(shellcheck -e "$skip" "$file")" "" \
32
+ "The shell file '$file' passes shellcheck"
33
+ done
34
+
35
+ done_testing
36
+
37
+ # vim: set ft=sh:
@@ -1,18 +1,17 @@
1
- #!/bin/bash -e
1
+ #!/usr/bin/env bash
2
2
 
3
- source test/test.bash
3
+ source test/setup
4
4
 
5
- PATH=$PWD/bin:$PATH
6
5
  source bash+ :std
7
6
 
8
- ok "`bash+:can use`" 'use is imported'
9
- ok "`bash+:can die`" 'die is imported'
10
- ok "`bash+:can warn`" 'warn is imported'
7
+ ok "$(bash+:can use)" 'use is imported'
8
+ ok "$(bash+:can die)" 'die is imported'
9
+ ok "$(bash+:can warn)" 'warn is imported'
11
10
 
12
- ok "`! bash+:can import`" 'import is not imported'
13
- ok "`! bash+:can main`" 'main is not imported'
14
- ok "`! bash+:can fcopy`" 'fcopy is not imported'
15
- ok "`! bash+:can findlib`" 'findlib is not imported'
16
- ok "`! bash+:can can`" 'can is not imported'
11
+ ok "$(! bash+:can import)" 'import is not imported'
12
+ ok "$(! bash+:can main)" 'main is not imported'
13
+ ok "$(! bash+:can fcopy)" 'fcopy is not imported'
14
+ ok "$(! bash+:can findlib)" 'findlib is not imported'
15
+ ok "$(! bash+:can can)" 'can is not imported'
17
16
 
18
17
  done_testing 8
@@ -1,21 +1,20 @@
1
- #!/bin/bash -e
1
+ #!/usr/bin/env bash
2
2
 
3
- source test/test.bash
3
+ source test/setup
4
4
 
5
- PATH=$PWD/bin:$PATH
6
5
  source bash+
7
6
 
8
7
  functions=(
9
- use
10
- import
11
- fcopy
12
- findlib
13
- die
14
- warn
15
- can
8
+ use
9
+ import
10
+ fcopy
11
+ findlib
12
+ die
13
+ warn
14
+ can
16
15
  )
17
16
 
18
- for f in ${functions[@]}; do
17
+ for f in "${functions[@]}"; do
19
18
  is "$(type -t "bash+:$f")" function \
20
19
  "bash+:$f is a function"
21
20
  done
@@ -1,18 +1,21 @@
1
- #!/bin/bash -e
1
+ #!/usr/bin/env bash
2
2
 
3
- source test/test.bash
3
+ source test/setup
4
4
 
5
- PATH=$PWD/bin:$PATH
6
5
  source bash+ :std can
7
6
 
7
+ # shellcheck disable=2034
8
8
  BASHLIB=test/lib
9
9
 
10
10
  use Foo::Bar
11
+
11
12
  ok $? 'use Foo::Bar - works'
12
- ok "`can Foo::Bar:baz`" 'Function Foo::Bar:baz exists'
13
+ ok "$(can Foo::Bar:baz)" 'Function Foo::Bar:baz exists'
14
+
15
+ # shellcheck disable=2016,2154
13
16
  is "$Foo__Bar_VERSION" 1.2.3 '$Foo__Bar_VERSION == 1.2.3'
14
17
 
15
- output=`use Foo::Foo Boo Booo`
18
+ output=$(use Foo::Foo Boo Booo)
16
19
  ok $? 'use Foo::Foo Boo Booo - works'
17
20
  is "$output" Boo---Booo 'Correct import called'
18
21
 
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env bash
2
+
3
+ source test/setup
4
+
5
+ PATH=$PWD/bin:$PATH
6
+ source bash+ version-check
7
+
8
+ t1() (echo 0.1.2)
9
+ t2() (echo 0.1)
10
+
11
+ ok "$(version-check t1 0)" "0.1.2 >= 0"
12
+ ok "$(version-check t1 0.1)" "0.1.2 >= 0.1"
13
+ ok "$(version-check t1 0.1.1)" "0.1.2 >= 0.1.1"
14
+ ok "$(version-check t1 0.1.2)" "0.1.2 >= 0.1.2"
15
+ ok "$(! version-check t1 0.2)" "0.1.2 >= 0.2 fails"
16
+ ok "$(! version-check t1 0.1.3)" "0.1.2 >= 0.1.3 fails"
17
+
18
+ ok "$(version-check t2 0)" "0.1 >= 0"
19
+ ok "$(version-check t2 0.1)" "0.1 >= 0.1"
20
+ ok "$(! version-check t2 0.2)" "0.1 >= 0.2 fails"
21
+ ok "$(! version-check t2 0.1.1)" "0.1 >= 0.1.1"
22
+
23
+ done_testing 10
@@ -0,0 +1,12 @@
1
+ ; DO NOT EDIT (unless you know what you are doing)
2
+ ;
3
+ ; This subdirectory is a git "subrepo", and this file is maintained by the
4
+ ; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme
5
+ ;
6
+ [subrepo]
7
+ remote = git@github.com:ingydotnet/test-more-bash.git
8
+ branch = master
9
+ commit = c7df24fcb0814fbb62a33d92dc3c8d526ff710f0
10
+ parent = 914c2ae8e3b881f62ca987c1c3343df6a034d865
11
+ cmdver = 0.4.1
12
+ method = merge
@@ -0,0 +1,6 @@
1
+ # C language gives closest shell env.
2
+ language: c
3
+
4
+ script:
5
+ - git submodule update --init --recursive
6
+ - PROVEOPT=-v make test
@@ -1,4 +1,15 @@
1
1
  ---
2
+ version: 0.0.5
3
+ date: Wed 11 Nov 2020 02:33:42 PM EST
4
+ changes:
5
+ - Refactor to modern bash
6
+ ---
7
+ version: 0.0.4
8
+ date: Fri Sep 4 12:26:58 2020 -0700
9
+ changes:
10
+ - Make up to date
11
+ - Apply a few PRs
12
+ ---
2
13
  version: 0.0.3
3
14
  date: Sat Jan 23 16:39:20 PST 2016
4
15
  changes:
@@ -1,6 +1,6 @@
1
1
  (The MIT License)
2
2
 
3
- Copyright © 2013-2016. Ingy döt Net.
3
+ Copyright © 2013-2020. Ingy döt Net.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of
6
6
  this software and associated documentation files (the ‘Software’), to deal in
@@ -2,6 +2,10 @@ NAME := test-more
2
2
  DOC := doc/$(NAME).swim
3
3
  MAN3 := man/man3
4
4
 
5
+ DOCKER_IMAGE := ingy/bash-testing:0.0.1
6
+ DOCKER_TESTS := 5.1 5.0 4.4 4.3 4.2 4.1 4.0 3.2
7
+ DOCKER_TESTS := $(DOCKER_TESTS:%=docker-test-%)
8
+
5
9
  default: help
6
10
 
7
11
  help:
@@ -11,6 +15,13 @@ help:
11
15
  test:
12
16
  prove $(PROVEOPT:%=% )test/
13
17
 
18
+ test-all: test docker-test
19
+
20
+ docker-test: $(DOCKER_TESTS)
21
+
22
+ $(DOCKER_TESTS):
23
+ $(call docker-make-test,$(@:docker-test-%=%))
24
+
14
25
  doc: ReadMe.pod $(MAN3)/$(NAME).3
15
26
 
16
27
  ReadMe.pod: $(DOC)
@@ -18,3 +29,17 @@ ReadMe.pod: $(DOC)
18
29
 
19
30
  $(MAN3)/%.3: doc/%.swim
20
31
  swim --to=man $< > $@
32
+
33
+ define docker-make-test
34
+ docker run -i -t --rm \
35
+ -v $(PWD):/git-subrepo \
36
+ -w /git-subrepo \
37
+ $(DOCKER_IMAGE) \
38
+ /bin/bash -c ' \
39
+ set -x && \
40
+ [[ -d /bash-$(1) ]] && \
41
+ export PATH=/bash-$(1)/bin:$$PATH && \
42
+ bash --version && \
43
+ make test \
44
+ '
45
+ endef
@@ -1,12 +1,12 @@
1
1
  =meta: 0.0.2
2
2
 
3
3
  name: test-more
4
- version: 0.0.3
4
+ version: 0.0.5
5
5
  abstract: TAP Testing for Bash
6
6
  homepage: http://bpan.org/package/test-more/
7
7
 
8
8
  license: MIT
9
- copyright: 2013-2016
9
+ copyright: 2013-2020
10
10
  author:
11
11
  name: Ingy döt Net
12
12
  email: ingy@ingy.net
@@ -16,9 +16,9 @@ author:
16
16
  homepage: http://ingy.net
17
17
 
18
18
  requires:
19
- bash: 3.2.0
20
- bashplus: 0.0.7
21
- test-tap: 0.0.4
19
+ bash: 4.4.0
20
+ bashplus: 0.0.9
21
+ test-tap: 0.0.5
22
22
  test:
23
23
  cmd: make test
24
24
  install:
@@ -1,7 +1,7 @@
1
1
  =pod
2
2
 
3
3
  =for comment
4
- DO NOT EDIT. This Pod was generated by Swim v0.1.41.
4
+ DO NOT EDIT. This Pod was generated by Swim v0.1.48.
5
5
  See http://github.com/ingydotnet/swim-pm#readme
6
6
 
7
7
  =encoding utf8
@@ -54,6 +54,10 @@ Write a test file like this. Maybe call it C<test/test.t>:
54
54
 
55
55
  note "A message for stdout"
56
56
 
57
+ output=( $(ls) )
58
+ expected=(README lib bin)
59
+ cmp-array output expected "list files"
60
+
57
61
  Run the test with C<prove> like this:
58
62
 
59
63
  prove test/test.t
@@ -98,17 +102,19 @@ This is the basic usage:
98
102
 
99
103
  =item * C<BAIL_OUT "$reason">
100
104
 
105
+ =item * `cmp-array output expected "message"
106
+
101
107
  =back
102
108
 
103
109
  More detailed info coming soon.
104
110
 
105
111
  =head1 Author
106
112
 
107
- Ingy döt Net <ingy@bpan.org>
113
+ Ingy döt Net <ingy@ingy.net>
108
114
 
109
115
  =head1 Copyright & License
110
116
 
111
- Copyright 2013-2016. Ingy döt Net.
117
+ Copyright 2013-2020. Ingy döt Net.
112
118
 
113
119
  The MIT License (MIT)
114
120
 
@@ -46,6 +46,10 @@ Write a test file like this. Maybe call it `test/test.t`:
46
46
 
47
47
  note "A message for stdout"
48
48
 
49
+ output=( $(ls) )
50
+ expected=(README lib bin)
51
+ cmp-array output expected "list files"
52
+
49
53
  Run the test with `prove` like this:
50
54
 
51
55
  prove test/test.t
@@ -75,15 +79,16 @@ This is the basic usage:
75
79
  * `done_testing $count`
76
80
  * `plan skip_all "$reason"`
77
81
  * `BAIL_OUT "$reason"`
82
+ * `cmp-array output expected "message"
78
83
 
79
84
  More detailed info coming soon.
80
85
 
81
86
  = Author
82
87
 
83
- Ingy döt Net <ingy@bpan.org>
88
+ Ingy döt Net <ingy@ingy.net>
84
89
 
85
90
  = Copyright & License
86
91
 
87
- Copyright 2013-2016. Ingy döt Net.
92
+ Copyright 2013-2020. Ingy döt Net.
88
93
 
89
94
  The MIT License (MIT)
@@ -0,0 +1,12 @@
1
+ ; DO NOT EDIT (unless you know what you are doing)
2
+ ;
3
+ ; This subdirectory is a git "subrepo", and this file is maintained by the
4
+ ; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme
5
+ ;
6
+ [subrepo]
7
+ remote = git@github.com:ingydotnet/bashplus.git
8
+ branch = master
9
+ commit = e49f45a1457fed3cceb15bd4a82b0f7515efd8e5
10
+ parent = c978e2afd6861203138f28d0021e03fa1ffbba0c
11
+ cmdver = 0.4.1
12
+ method = merge
@@ -0,0 +1,6 @@
1
+ # C language gives closest shell env.
2
+ language: c
3
+
4
+ script:
5
+ - git submodule update --init --recursive
6
+ - PROVEOPT=-v make test
@@ -1,4 +1,15 @@
1
1
  ---
2
+ version: 0.0.9
3
+ date: Wed 11 Nov 2020 02:19:32 PM EST
4
+ changes:
5
+ - Apply shellcheck fixes
6
+ - Modernize bash code
7
+ ---
8
+ version: 0.0.8
9
+ date: Fri Aug 21 08:00:45 PDT 2020
10
+ changes:
11
+ - Support paths with spaces @admorgan++
12
+ ---
2
13
  version: 0.0.7
3
14
  date: Sat Jan 23 16:28:59 PST 2016
4
15
  changes:
@@ -1,6 +1,6 @@
1
1
  (The MIT License)
2
2
 
3
- Copyright © 2013-2016 Ingy döt Net
3
+ Copyright © 2013-2020 Ingy döt Net
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of
6
6
  this software and associated documentation files (the ‘Software’), to deal in
@@ -15,6 +15,10 @@ INSTALL_DIR ?= test
15
15
  INSTALL_MAN1 ?= $(shell bpan env BPAN_MAN1)
16
16
  INSTALL_MAN3 ?= $(shell bpan env BPAN_MAN3)
17
17
 
18
+ DOCKER_IMAGE := ingy/bash-testing:0.0.1
19
+ DOCKER_TESTS := 5.1 5.0 4.4 4.3 4.2 4.1 4.0 3.2
20
+ DOCKER_TESTS := $(DOCKER_TESTS:%=docker-test-%)
21
+
18
22
  default: help
19
23
 
20
24
  help:
@@ -24,6 +28,13 @@ help:
24
28
  test:
25
29
  prove $(PROVEOPT:%=% )test/
26
30
 
31
+ test-all: test docker-test
32
+
33
+ docker-test: $(DOCKER_TESTS)
34
+
35
+ $(DOCKER_TESTS):
36
+ $(call docker-make-test,$(@:docker-test-%=%))
37
+
27
38
  install:
28
39
  install -C -d -m 0755 $(INSTALL_LIB)/$(INSTALL_DIR)/
29
40
  install -C -m 0755 $(LIB) $(INSTALL_LIB)/$(INSTALL_DIR)/
@@ -43,3 +54,17 @@ $(MAN1)/%.1: doc/%.swim
43
54
 
44
55
  $(MAN3)/%.3: doc/%.swim
45
56
  swim --to=man $< > $@
57
+
58
+ define docker-make-test
59
+ docker run -i -t --rm \
60
+ -v $(PWD):/git-subrepo \
61
+ -w /git-subrepo \
62
+ $(DOCKER_IMAGE) \
63
+ /bin/bash -c ' \
64
+ set -x && \
65
+ [[ -d /bash-$(1) ]] && \
66
+ export PATH=/bash-$(1)/bin:$$PATH && \
67
+ bash --version && \
68
+ make test \
69
+ '
70
+ endef
@@ -1,12 +1,12 @@
1
1
  =meta: 0.0.2
2
2
 
3
3
  name: bashplus
4
- version: 0.0.7
4
+ version: 0.0.9
5
5
  abstract: Modern Bash Programming
6
6
  homepage: http://bpan.org/package/bashplus/
7
7
 
8
8
  license: MIT
9
- copyright: 2013-2016
9
+ copyright: 2013-2020
10
10
  author:
11
11
  name: Ingy döt Net
12
12
  email: ingy@ingy.net
@@ -16,7 +16,7 @@ author:
16
16
  homepage: http://ingy.net
17
17
 
18
18
  requires:
19
- bash: 3.2.0
19
+ bash: 4.4.0
20
20
  test:
21
21
  cmd: make test
22
22
  install:
@@ -1,7 +1,7 @@
1
1
  =pod
2
2
 
3
3
  =for comment
4
- DO NOT EDIT. This Pod was generated by Swim v0.1.41.
4
+ DO NOT EDIT. This Pod was generated by Swim v0.1.48.
5
5
  See http://github.com/ingydotnet/swim-pm#readme
6
6
 
7
7
  =encoding utf8
@@ -70,7 +70,7 @@ Written by Ingy döt Net <ingy@ingy.net>
70
70
 
71
71
  =head1 Copyright & License
72
72
 
73
- Copyright 2013-2016. Ingy döt Net.
73
+ Copyright 2013-2020. Ingy döt Net.
74
74
 
75
75
  The MIT License (MIT).
76
76
 
@@ -2,29 +2,30 @@
2
2
  #------------------------------------------------------------------------------
3
3
  # Bash+ - Modern Bash Programming
4
4
  #
5
- # Copyright (c) 2013-2016 Ingy döt Net
5
+ # Copyright (c) 2013-2020 Ingy döt Net
6
6
  #------------------------------------------------------------------------------
7
7
 
8
8
  set -e
9
- shopt -s compat31&>/dev/null||:
9
+ shopt -s compat31 &>/dev/null || true
10
10
 
11
11
  #------------------------------------------------------------------------------
12
12
  # Determine how `bash+` was called, and do the right thing:
13
13
  #------------------------------------------------------------------------------
14
- if [ "${BASH_SOURCE[0]}" != "$0" ]; then
14
+ if [[ ${BASH_SOURCE[0]} != "$0" ]]; then
15
15
  # 'bash+' is being sourced:
16
- [[ "${BASH_SOURCE[0]}" =~ /bin/bash\\+$ ]] || {
16
+ [[ ${BASH_SOURCE[0]} =~ /bin/bash\\+$ ]] || {
17
17
  echo "Invalid Bash+ path '${BASH_SOURCE[0]}'" 2> /dev/null
18
18
  exit 1
19
19
  }
20
20
  source "${BASH_SOURCE[0]%/bin/*}"/lib/bash+.bash || return $?
21
21
  bash+:import "$@"
22
22
  return $?
23
+
23
24
  else
24
- if [ $# -eq 1 -a "$1" == --version ]; then
25
- echo 'bash+ version 0.0.7'
25
+ if [[ $# -eq 1 ]] && [[ $1 == --version ]]; then
26
+ echo 'bash+ version 0.0.9'
26
27
  else
27
- cat <<...
28
+ cat <<'...'
28
29
 
29
30
  Greetings modern Bash programmer. Welcome to Bash+!
30
31
 
@@ -56,6 +56,6 @@ Written by Ingy döt Net <ingy@ingy.net>
56
56
 
57
57
  = Copyright & License
58
58
 
59
- Copyright 2013-2016. Ingy döt Net.
59
+ Copyright 2013-2020. Ingy döt Net.
60
60
 
61
61
  The MIT License (MIT).