Skip to content

Commit

Permalink
git subrepo clone git@github.com:ingydotnet/test-more-bash ext/test-m…
Browse files Browse the repository at this point in the history
…ore-bash

{"local":
  {"subdir":  "ext/test-more-bash"
  ,"action":  "clone"}
,"remote":
  {"url":     "git@github.com:ingydotnet/test-more-bash"
  ,"branch":  "master"
  ,"commit":  "5893b1e"}
,"git-subrepo":
  {"version": "0.1.0"
  ,"commit":  "d1a9fbd"
  ,"origin":  "git@github.com:ingydotnet/git-subrepo"}}
  • Loading branch information
ingydotnet committed Dec 4, 2014
1 parent 91d6996 commit 35ba74b
Show file tree
Hide file tree
Showing 59 changed files with 1,510 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ext/test-more-bash/.gitrepo
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
; DO NOT EDIT (unless you know what you are doing)
;
; This subdirectory is a git "subrepo", and this file is maintained by the
; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme
;
[subrepo]
remote = git@github.com:ingydotnet/test-more-bash
branch = master
commit = 5893b1e942488f65febb7368dbabb1bc8bcda2dc
parent = 373084ba64dbe5326bab1d3ce14f8e579c67434f
cmdver = 0.1.0
6 changes: 6 additions & 0 deletions ext/test-more-bash/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# C language gives closest shell env.
language: c

script:
- git submodule update --init --recursive
- PROVEOPT=-v make test
5 changes: 5 additions & 0 deletions ext/test-more-bash/Changes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
version: 0.0.1
date: Sun Oct 27 22:53:10 PDT 2013
changes:
- First release.
21 changes: 21 additions & 0 deletions ext/test-more-bash/License
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
(The MIT License)

Copyright © 2013, 2014 Ingy döt Net

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the ‘Software’), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
19 changes: 19 additions & 0 deletions ext/test-more-bash/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
NAME = test-more
DOC = doc/$(NAME).swim
MAN = $(MAN3)/$(NAME).3
MAN3 = man/man3

.PHONY: test
test:
prove $(PROVEOPT:%=% )test/

doc: $(MAN) ReadMe.pod

$(MAN3)/%.3: doc/%.swim swim-check
swim --to=man $< > $@

ReadMe.pod: $(DOC) swim-check
swim --to=pod --complete=1 --wrap=1 $< > $@

swim-check:
@# Need to assert Swim and Swim::Plugin::badge are installed
30 changes: 30 additions & 0 deletions ext/test-more-bash/Meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
=meta: 0.0.1

name: test-more
version: 0.0.1
abstract: TAP Testing for Bash
homepage: http://bpan.org/package/test-more/

license: MIT
copyright: 2013, 2014
author:
name: Ingy döt Net
email: ingy@ingy.net
github: ingydotnet
twitter: ingydotnet
freenode: ingy
homepage: http://ingy.net

requires:
bash: 3.2.0
bashplus: 0.0.1
test-tap: 0.0.1
test:
cmd: make test
install:
cmd: make install

devel:
git: git@github.org/ingydotnet/test-more-bash.git
irc: irc.freenode.net#bpan
bug: https://github.com/ingydotnet/test-more-bash/issues/
113 changes: 113 additions & 0 deletions ext/test-more-bash/ReadMe.pod
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
=pod

=for comment
DO NOT EDIT. This Pod was generated by Swim.
See http://github.com/ingydotnet/swim-pm#readme

=encoding utf8

=head1 Name

Test::More - TAP Testing for Bash

=for html
<a href="https://travis-ci.org/ingydotnet/test-more-bash"><img src="https://travis-ci.org/ingydotnet/test-more-bash.png" alt="test-more-bash"></a>

=head1 Synopsis

Write a test file like this. Maybe call it C<test/test.t>:

#!/usr/bin/env bash

TEST_MORE_PATH="/path/to/test-more-bash"
BASHLIB="`
find $TEST_MORE_PATH -type d |
grep -E '/(bin|lib)$' |
xargs -n1 printf "%s:"`"
PATH="$BASHLIB$PATH"

source bash+ :std

use Test::More

plan tests 8

some-command
ok $? 'some-command is ok'

# or:
ok "`some-command`" 'some-command is ok'

pass 'This will always pass'

fail 'This will always fail'

is `echo foo` 'foo' 'foo is foo'

isnt foo bar "foo isn't bar"

like food foo 'food is like foo'

unlike team I "There's no 'I' in 'team'"

diag "A message for stderr"

note "A message for stdout"

Run the test with C<prove> like this:

prove test/test.t

Prove knows it's Bash from the first line (the hashbang), and it just works.

=head1 Description

Test::More is the tried and true testing library for Perl. It uses TAP (the
Test Anything Protocol). This is the same thing for Bash. For the most part it
should work exactly the same.

=head1 Methods

This is the basic usage:

=over

=item * C<plan tests $count>

=item * C<ok $status_code "$label">

=item * C<pass "$label">

=item * C<fail "$label">

=item * C<is "$got" "$want" "label">

=item * C<isnt "$got" "$unwanted" "$label">

=item * C<like "$got" "$regex" "$label">

=item * C<unlike "$got" "$regex" "$label">

=item * C<diag "$message">

=item * C<note "$message">

=item * C<done_testing $count>

=item * C<plan skip_all "$reason">

=item * C<BAIL_OUT "$reason">

=back

More detailed info coming soon.

=head1 Author

Ingy döt Net <ingy@bpan.org>

=head1 Copyright

Copyright 2013-2014 Ingy döt Net

=cut
87 changes: 87 additions & 0 deletions ext/test-more-bash/doc/test-more.swim
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
Test::More
==========

TAP Testing for Bash

<badge travis ingydotnet/test-more-bash>

= Synopsis

Write a test file like this. Maybe call it `test/test.t`:

#!/usr/bin/env bash

TEST_MORE_PATH="/path/to/test-more-bash"
BASHLIB="`
find $TEST_MORE_PATH -type d |
grep -E '/(bin|lib)$' |
xargs -n1 printf "%s:"`"
PATH="$BASHLIB$PATH"

source bash+ :std

use Test::More

plan tests 8

some-command
ok $? 'some-command is ok'

# or:
ok "`some-command`" 'some-command is ok'

pass 'This will always pass'

fail 'This will always fail'

is `echo foo` 'foo' 'foo is foo'

isnt foo bar "foo isn't bar"

like food foo 'food is like foo'

unlike team I "There's no 'I' in 'team'"

diag "A message for stderr"

note "A message for stdout"

Run the test with `prove` like this:

prove test/test.t

Prove knows it's Bash from the first line (the hashbang), and it just works.

= Description

Test::More is the tried and true testing library for Perl. It uses TAP (the
Test Anything Protocol). This is the same thing for Bash. For the most part it
should work exactly the same.

= Methods

This is the basic usage:

* `plan tests $count`
* `ok $status_code "$label"`
* `pass "$label"`
* `fail "$label"`
* `is "$got" "$want" "label"`
* `isnt "$got" "$unwanted" "$label"`
* `like "$got" "$regex" "$label"`
* `unlike "$got" "$regex" "$label"`
* `diag "$message"`
* `note "$message"`
* `done_testing $count`
* `plan skip_all "$reason"`
* `BAIL_OUT "$reason"`

More detailed info coming soon.

= Author

Ingy döt Net <ingy@bpan.org>

= Copyright

Copyright 2013-2014 Ingy döt Net
Empty file.
11 changes: 11 additions & 0 deletions ext/test-more-bash/ext/bashplus/.gitrepo
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
; DO NOT EDIT (unless you know what you are doing)
;
; This subdirectory is a git "subrepo", and this file is maintained by the
; git-subrepo command. See https://github.com/ingydotnet/git-subrepo#readme
;
[subrepo]
remote = git@github.com:ingydotnet/bashplus.git
branch = master
commit = 6f15ca55fc89b728df5d7a2c0daccac435939d0a
former = cfd84ccc65a1ba0d7f9e494a4d5fb7957fc4f4c5
cmdver = 0.1.0
6 changes: 6 additions & 0 deletions ext/test-more-bash/ext/bashplus/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# C language gives closest shell env.
language: c

script:
- git submodule update --init --recursive
- PROVEOPT=-v make test
5 changes: 5 additions & 0 deletions ext/test-more-bash/ext/bashplus/Changes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
version: 0.0.1
date: Sun Oct 27 19:07:51 PDT 2013
changes:
- First release.
21 changes: 21 additions & 0 deletions ext/test-more-bash/ext/bashplus/License
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
(The MIT License)

Copyright © 2013 Ingy döt Net

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the ‘Software’), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
15 changes: 15 additions & 0 deletions ext/test-more-bash/ext/bashplus/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.PHONY: default help test

default: help

help:
@echo 'Makefile targets:'
@echo ''
@echo ' test - Run test suite'
@echo ''

test:
prove $(PROVEOPT:%=% )test/

install:
@echo 'install not implemented yet'
18 changes: 18 additions & 0 deletions ext/test-more-bash/ext/bashplus/Package
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[pkg]
name = bashplus
author = Ingy döt Net <ingy@bpan.org>
copyright-holder = Ingy döt Net
copyright-year = 2013
license = MIT
abstract = Modern Bash Programming
source-url = git@github.com:bash-org/bashplus.git
home-url = http://github.com/bash-org/bashplus#readme

[bpan]
version = 0.0.1
owner = ingydotnet
requires-bash = > 3.2

; Set prereqs so that these core packages get installed with Bash+
requires-package = test-more
requires-package = config-ini
1 change: 1 addition & 0 deletions ext/test-more-bash/ext/bashplus/ReadMe.md
Loading

0 comments on commit 35ba74b

Please sign in to comment.