Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ShellSpec tests #134

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/.shellspec-local
/.shellspec-quick.log
/report/
/coverage/
/lib/json/coverage/
15 changes: 15 additions & 0 deletions .shellspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
--require spec_helper
--shell bash
--default-path "**/spec"
--execdir @basedir

## Default kcov (coverage) options
# --kcov-options "--include-path=. --path-strip-level=1"
# --kcov-options "--include-pattern=.sh"
# --kcov-options "--exclude-pattern=/.shellspec,/spec/,/coverage/,/report/"

## Example: Include script "myprog" with no extension
# --kcov-options "--include-pattern=.sh,myprog"

## Example: Only specified files/directories
# --kcov-options "--include-pattern=myprog,/lib/"
Binary file added coverage/amber.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions coverage/bcov.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/* Based upon the lcov CSS style, style files can be reused */
body { color: #000000; background-color: #FFFFFF; }
a:link { color: #284FA8; text-decoration: underline; }
a:visited { color: #00CB40; text-decoration: underline; }
a:active { color: #FF0040; text-decoration: underline; }
td.title { text-align: center; padding-bottom: 10px; font-size: 20pt; font-weight: bold; }
td.ruler { background-color: #6688D4; }
td.headerItem { text-align: right; padding-right: 6px; font-family: sans-serif; font-weight: bold; }
td.headerValue { text-align: left; color: #284FA8; font-family: sans-serif; font-weight: bold; }
td.versionInfo { text-align: center; padding-top: 2px; }
th.headerItem { text-align: right; padding-right: 6px; font-family: sans-serif; font-weight: bold; }
th.headerValue { text-align: left; color: #284FA8; font-family: sans-serif; font-weight: bold; }
pre.source { font-family: monospace; white-space: pre; overflow: hidden; text-overflow: ellipsis; }
span.lineNum { background-color: #EFE383; }
span.lineNumLegend { background-color: #EFE383; width: 96px; font-weight: bold ;}
span.lineCov { background-color: #adff9a; }
span.linePartCov { background-color: #fffe80; }
span.lineNoCov { background-color: #ffbbbb; }
span.orderNum { background-color: #e0b373; float: right; width:5em; text-align: left; }
span.orderNumLegend { background-color: #e0b373; width: 96px; font-weight: bold ;}
span.coverHits { background-color: #DFE383; padding-left: 3px; padding-right: 1px; text-align: right; list-style-type: none; display: inline-block; width: 5em; }
span.coverHitsLegend { background-color: #DFE383; width: 96px; font-weight: bold; margin: 0 auto;}
td.tableHead { text-align: center; color: #FFFFFF; background-color: #6688D4; font-family: sans-serif; font-size: 120%; font-weight: bold; }
td.coverFile { text-align: left; padding-left: 10px; padding-right: 20px; color: #284FA8; font-family: monospace; }
td.coverBar { padding-left: 10px; padding-right: 10px; background-color: #DAE7FE; }
td.coverBarOutline { background-color: #000000; }
td.coverPer { text-align: left; padding-left: 10px; padding-right: 10px; font-weight: bold; }
td.coverPerLeftMed { text-align: left; padding-left: 10px; padding-right: 10px; background-color: #fffe80; font-weight: bold; }
td.coverPerLeftLo { text-align: left; padding-left: 10px; padding-right: 10px; background-color: #ffbbbb; font-weight: bold; }
td.coverPerLeftHi { text-align: left; padding-left: 10px; padding-right: 10px; background-color: #adff9a; font-weight: bold; }
td.coverNum { text-align: right; padding-left: 10px; padding-right: 10px; }
td.coverNum { text-align: right; padding-left: 10px; padding-right: 10px; }
1 change: 1 addition & 0 deletions coverage/bpkg [specfiles].926e005c9144c333
72 changes: 72 additions & 0 deletions coverage/bpkg [specfiles]/JSON.sh.703d91c7.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<script type="text/javascript" src="JSON.sh.703d91c7.js"></script>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta charset="utf-8">
<title id="window-title">???</title>
<link rel="stylesheet" type="text/css" href="../data/bcov.css"/>
</head>
<script type="text/javascript" src="data/js/jquery.min.js"></script>
<script type="text/javascript" src="data/js/handlebars.js"></script>
<script type="text/javascript" src="data/js/kcov.js"></script>

<body>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td class="title">Coverage Report</td></tr>
<tr><td class="ruler"><img src="data/glass.png" width="3" height="3" alt=""/></td></tr>
<tr>
<td width="100%">
<table cellpadding="1" border="0" width="100%">
<tr id="command">
<td class="headerItem" width="20%">Command:</td>
<td id="header-command" class="headerValue" width="60%" colspan=4>???</td>
<td><span class="lineNumLegend">Line number</span></td>
</tr>
<tr>
<td class="headerItem" width="20%">Date: </td>
<td id="header-date" class="headerValue" width="20%" colspan=2></td>
<td class="headerItem" width="20%">Instrumented lines:</td>
<td id="header-instrumented" class="headerValue" width="20%">???</td>
<td><span class="coverHitsLegend">Hits</span></td>
</tr>
<tr>
<td class="headerItem" width="20%">Code covered:</td>
<td id="header-percent-covered" width="20%" colspan=2>???</td>
<td class="headerItem" width="20%">Executed lines:</td>
<td id="header-covered" class="headerValue" width="20%">???</td>
<td><span class="orderNumLegend">Order</span></td>
</tr>
</table>
</td>
</tr>
<tr><td class="ruler"><img src="data/glass.png" width="3" height="3" alt=""/></td></tr>
</table>

<script id="lines-template" type="text/x-handlebars-template">
<pre class="source" id="main-data">
{{#each lines}}
{{#ifCond possible_hits "==" "0"}}
<source-line><span class="lineNum">{{lineNum}}</span><span class="coverHits">{{hits}} </span><span class="{{class}}"> {{line}}</span></span><span class="orderNum"> {{order}}</span></source-line>
{{else}}
{{#exists possible_hits}}
<source-line><span class="lineNum">{{lineNum}}</span><span class="coverHits">{{hits}} / {{possible_hits}}</span><span class="{{class}}"> {{line}}</span><span class="orderNum"> {{order}}</span></source-line>
{{else}}
{{#exists class}}
<source-line><span class="lineNum">{{lineNum}}</span><span class="coverHits">&nbsp;</span><span class="{{class}}"> {{line}}</span></span><span class="orderNum">&nbsp;</span></source-line>
{{else}}
<source-line><span class="lineNum">{{lineNum}}</span><span class="coverHits">&nbsp;</span><span class="{{class}}"> {{line}}</span><span class="orderNum">&nbsp;</span></source-line>
{{/exists}}
{{/exists}}
{{/ifCond}}
{{/each}}
</pre>
</script>
<div id="lines-placeholder"></div>

<table width="100%" border="0" cellspacing="0" cellpadding="0" id="merged-data">
<tr><td class="ruler"><img src="data/amber.png" width="3" height="3" alt=""/></td></tr>
<tr><td class="versionInfo">Generated by: <a href="http://simonkagstrom.github.com/kcov/index.html">Kcov</a></td></tr>
</table>
</body>
</html>
Loading