forked from holman/spark
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
86524cd
commit d3f7833
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env roundup | ||
|
||
describe "spark: Generates sparklines for a set of data." | ||
|
||
spark="./spark" | ||
|
||
it_graphs_argv_data() { | ||
graph="$($spark 1,5,22,13,5)" | ||
|
||
test $graph = '▁▂▇▅▂' | ||
} | ||
|
||
it_charts_pipe_data() { | ||
data="0,30,55,80,33,150" | ||
graph="$(echo $data | $spark)" | ||
|
||
test $graph = '▁▂▃▄▂▇' | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/sh | ||
# | ||
# Run roundup tests for spark. | ||
# | ||
|
||
roundup=$(which roundup) | ||
|
||
[ ! -z $roundup ] || { | ||
cat <<MESSAGE 1>&2 ; | ||
error: roundup missing | ||
Check out https://github.com/bmizerany/roundup for instructions on installing roundup. | ||
MESSAGE | ||
|
||
exit 1; | ||
} | ||
|
||
$roundup ./*-test.sh |