Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
9974db5
Added support for sorting contents of the JSON markup, for printing o…
jimklimov Jan 6, 2015
e04de1a
Added tests for sorting (with multiple parameters) and normalization
jimklimov Jan 7, 2015
2e6a44b
Tweaks to ensure better portability (now tested in Linux and Solaris)
jimklimov Jan 7, 2015
9297df3
Added tests for combination of normalized+sorted content
jimklimov Jan 7, 2015
c98786e
Added tests for an array with several empty strings (should remain in…
jimklimov Jan 7, 2015
966a2ee
Added an option to abort at strings with embedded newlines rather tha…
jimklimov Jan 7, 2015
67b6369
Add a way to easily generate expected-valid-result files in a standar…
jimklimov Jan 7, 2015
29603a3
Fixed tests for array_with_empty_elements: the "sorted" variant was m…
jimklimov Jan 7, 2015
fd1bb4c
JSON.sh optimization: relocated call of strip_newlines() into start o…
jimklimov Jan 7, 2015
def8dc6
Allow to (re)generate expected results just for named files rather th…
jimklimov Jan 7, 2015
0e8dcf1
JSON.sh can now "extract" and display only those items whose jpath ma…
jimklimov Jan 7, 2015
8096cb2
JSON.sh now has debugging option (to trace why some lines are printed…
jimklimov Jan 7, 2015
d64ca2e
JSON.sh: added a mode to help "cook" input text into escaped strings …
jimklimov Jan 8, 2015
9c04412
JSON.sh debugging greatly enhanced; content-cooking mode now also esc…
jimklimov Jan 8, 2015
7e5e3f6
JSON.sh now tolerant of tab characters inside strings in JSON contents
jimklimov Jan 8, 2015
6b9e724
JSON.sh: for feature parity, support -x="regex" as well as -x "regex"
jimklimov Jan 9, 2015
2e34b77
Moved the examples from the pull-request into the project README file
jimklimov Jan 11, 2015
c104dd1
README updated for newly added usage() modes
jimklimov Jan 11, 2015
8a56928
README markup updated for prettiness and a few bugs fixed too ;)
jimklimov Jan 11, 2015
8a53cb7
Usage() for -x updated to stress object vs. array in jpath
jimklimov Jan 11, 2015
70e1af2
README markup updated for prettiness
jimklimov Jan 11, 2015
8021e55
Typo fix in documented_example.*: smptystr => emptystr
jimklimov Jan 10, 2015
c501592
Added and documented new options to sorting/normalization to only set…
jimklimov Jan 12, 2015
9bcc850
JSON.sh: added ability to normalize numbers into a common format for …
jimklimov Apr 1, 2015
a4e52bc
JSON.sh: a leading plus is technically valid character in a number as…
jimklimov Apr 1, 2015
2e7a322
JSON.sh: support numbers starting with a decimal point (no leading ze…
jimklimov Apr 1, 2015
b8f03a7
Added tests and expected results for number normalization
jimklimov Apr 1, 2015
f451815
valid-test.sh : support listing of tests to run on command line (defa…
jimklimov Apr 1, 2015
b81eb00
Generated numnormalized results for older existing tests
jimklimov Apr 1, 2015
de6f7fd
Merged with upstream version 0.2.0 changes (support for solidus escap…
jimklimov Apr 1, 2015
b2cbb39
JSON.sh: support empty documents (no token in input, empty jpath when…
jimklimov Apr 14, 2015
38746ff
JSON.sh: null-string comparison prefers separate clauses
jimklimov Apr 21, 2015
b447640
invalid-test.sh valid-test.sh : reordered counters into "ls -1 pattern"
jimklimov Jul 7, 2015
297d4a3
JSON.sh : added link to my repo
jimklimov Jul 7, 2015
8804192
JSON.sh quote token values in EXPECTED and in debug outputs
jimklimov Jul 7, 2015
d274e81
JSON.sh : adapting to Solaris - better guess grep, egrep and awk
jimklimov Jul 7, 2015
ea4c9b6
Removed invalid/empty.json: this is not in fact invalid JSON, and co…
jimklimov Jul 7, 2015
0394bc6
JSON.sh : typo fix in recent changes
jimklimov Jul 7, 2015
f2b1376
JSON.sh : refactored binfile lookup into a function; script now mostl…
jimklimov Jul 7, 2015
a062ada
pedantic-empty-test.sh : initial commit (test to validate empty docum…
jimklimov Jul 28, 2015
fb6b97c
JSON.sh : licensing header reformatted to fit internal project for wh…
jimklimov Aug 19, 2015
3f86a4d
JSON.sh : added paths to GNU tools that are expected on Solaris/OpenI…
jimklimov Jan 11, 2016
cf12fc9
JSON.sh : refactored the CLI-driven logic into jsonsh_cli() and separ…
jimklimov Jan 11, 2016
26ecf00
JSON.sh : fixing detection of bash-sourcing
jimklimov Jan 14, 2016
0833dbe
JSON.sh : added cook_a_string_arg() routine (-QQ flag)
jimklimov Jan 14, 2016
50c6372
JSON.sh : added jsonsh_cli_subshell()
jimklimov Jan 14, 2016
638c711
JSON.sh : when using -QQ flag to call cook_a_string_arg() routine, ig…
jimklimov Jan 14, 2016
61b8306
JSON.sh : make sure we run in BASH
jimklimov Jan 14, 2016
aeda42a
JSON.sh : make sure strings with quotes and backslashes are cooked sl…
jimklimov Jan 14, 2016
e26d26b
cook-test.sh : adding a simple test for cook_a_string_arg()
jimklimov Jan 14, 2016
28df951
JSON.sh : converted all reasonable bracket-tests to builtin double-br…
jimklimov Jan 14, 2016
0c0f281
Bump copyright for Eaton-paid branch
jimklimov Feb 7, 2017
f3b3c0b
Updated with upstream changes as of 2017-02-07 (and identified TODOs …
jimklimov Feb 7, 2017
5112ec6
Convert all test scripts to use common plain-shell syntax
jimklimov Feb 7, 2017
1fc69fa
JSON.sh : improve protability to older shells
jimklimov Feb 7, 2017
282ec90
Test scripts : use sourced script and jsonsh_cli() so as to test in s…
jimklimov Feb 7, 2017
0a11108
all-tests.sh : allow testing with different shells
jimklimov Feb 7, 2017
278611f
all-tests.sh : report which shells were tested and how they performed
jimklimov Feb 7, 2017
d9772af
Add support for JSONSH_SOURCED=yes as a way of skipping jsonsh_cli() …
jimklimov Feb 7, 2017
f5296ba
JSON.sh : flag support for bash regex with SHELL_REGEX=yes and fall b…
jimklimov Feb 7, 2017
9132d57
invalid-test.sh : print STDERR on failures too
jimklimov Feb 7, 2017
5461545
JSON.sh : flag support for bash regex with SHELL_TWOSLASH=yes and fal…
jimklimov Feb 7, 2017
48b56ea
JSON.sh : dropped ARGN from CLI arg parsing
jimklimov Feb 7, 2017
ebe55a1
JSON.sh : dropped space between func names and "()"
jimklimov Feb 7, 2017
39ee8cc
.travis.yml : use matrix-testing to try different shells and see regr…
jimklimov Feb 8, 2017
231c640
all-tests.sh : add TEST_PATTERN support and more useful failure repor…
jimklimov Feb 8, 2017
bc519f0
all-tests.sh : track the "passed" value from zero (saner reports if E…
jimklimov Feb 8, 2017
f517a46
Sub-tests: work around lack of pipefail in non-bash by explicit call-…
jimklimov Feb 8, 2017
30777d0
no-head-test.sh : report details if test-errors happen
jimklimov Feb 8, 2017
6ecedf2
.travis.yml : install the shells we test in
jimklimov Feb 8, 2017
ac6872f
.travis.yml : install the shells we test in on various platforms
jimklimov Feb 8, 2017
9c154cc
Subtests should use printf rather than echo for parsed data, to avoid…
jimklimov Feb 8, 2017
0c7dd88
solidus-test.sh : track number of test
jimklimov Feb 8, 2017
6c87fb0
.travis.yml : enable JSON.sh debugging to trace what fails how in dif…
jimklimov Feb 8, 2017
13e6c32
.travis.yml : do not do KSH for now - it hangs (waits for input?)
jimklimov Feb 8, 2017
5fe8680
.travis.yml : skip blanket debug
jimklimov Feb 8, 2017
b03c918
Sub-test scripts - enable tracing of those which fail
jimklimov Feb 8, 2017
d01ed60
JSON.sh : try to detect shell type and features of current interpreter
jimklimov Feb 8, 2017
a170d9d
JSON.sh : try to detect if we are sourced and/or can reexec into anot…
jimklimov Feb 8, 2017
5d055f9
JSON.sh : quote some more vars for portability
jimklimov Feb 8, 2017
2aac0ec
JSON.sh : replace "local" with "typeset var" for portability
jimklimov Feb 8, 2017
30d919c
JSON.sh : quote some more vars for portability
jimklimov Feb 8, 2017
40ba0dc
Revert "JSON.sh : replace "local" with "typeset var" for portability"
jimklimov Feb 8, 2017
aabbf96
JSON.sh : use none of the advanced features in dash/ash
jimklimov Feb 8, 2017
4813133
Sub-tests : take care of shwordsplit for zsh, wherever we iterate "fo…
jimklimov Feb 8, 2017
b9cc99a
Sub-tests : use common "${tmp}"
jimklimov Feb 8, 2017
84b0168
Sub-tests : no-head-test.sh : report contents of "$expected"
jimklimov Feb 8, 2017
64a00aa
tokenizer-test.sh : optimize a bit and update for portability
jimklimov Feb 8, 2017
12fbdd1
Sub-tests : no-head-test.sh : report contents of "$expected"
jimklimov Feb 8, 2017
d84bf3d
Sub-tests : no-head-test.sh : use printf when preparing (and displayi…
jimklimov Feb 8, 2017
e0fdb2f
JSON.sh : be more careful about return codes of the tokenize() call
jimklimov Feb 8, 2017
a835316
tokenizer-test.sh : fix the test (logic error) and improve reports fo…
jimklimov Feb 8, 2017
cd3ce67
valid-test.sh : report details of failures, if any
jimklimov Feb 8, 2017
a7f6899
JSON.sh : replace "echo -E" with "printf %s\n"
jimklimov Feb 8, 2017
d7ab0c2
all-tests.sh : do not test with KSH by default so far
jimklimov Feb 8, 2017
8b1357b
JSON.sh : avoid potential errors due to unset DEBUG value
jimklimov Feb 8, 2017
288bfd2
JSON.sh : fix fails when DEBUG is enabled and input does not end with…
jimklimov Feb 8, 2017
a2059b5
Merge commit '288bfd26b6b9eb3ce01520065b796b133b22d581'
jimklimov Oct 7, 2019
87e614f
Merge remote-tracking branch 'opensource/master' and solve conflicts …
jimklimov Jun 24, 2020
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
47 changes: 43 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,53 @@
language: python

sudo: false

# Effectively the list below is for Linux; MacOS is kept separately
os:
- linux

addons:
apt:
packages:
- bash
- dash
- zsh
- ash
- busybox
- ksh

env:
# global:
# - DEBUG=99
# - TEST_PATTERN='test/*.sh'
matrix:
- SHELL_PROGS=bash
- SHELL_PROGS=ash
- SHELL_PROGS=zsh
- SHELL_PROGS=dash
- SHELL_PROGS=busybox
# - SHELL_PROGS=ksh
# - SHELL_PROGS=ksh88
# - SHELL_PROGS=ksh93

# Note that this does not inherit env: or pacages from above
matrix:
include:
- os: macos
env: SHELL_PROGS=bash
- os: macos
env: SHELL_PROGS=dash

before_install:
- if [ "$TRAVIS_OS_NAME" = "osx" ] ; then brew update; brew install busybox bash ash dash zsh ksh ; fi

# Whatever the current shebang, replace with hardcoded shell
script: >
sed -i '1s@.*@#!/usr/bin/env bash@' JSON.sh && ./all-tests.sh &&
sed -i '1s@.*@#!/usr/bin/env zsh@' JSON.sh && ./all-tests.sh &&
sed -i '1s@.*@#!/usr/bin/env dash@' JSON.sh && ./all-tests.sh
#script: >
# sed -i '1s@.*@#!/usr/bin/env bash@' JSON.sh && ./all-tests.sh &&
# sed -i '1s@.*@#!/usr/bin/env zsh@' JSON.sh && ./all-tests.sh &&
# sed -i '1s@.*@#!/usr/bin/env dash@' JSON.sh && ./all-tests.sh

# This version of the script can use specified shell to source and test JSON.sh
# Note that some platforms can lack some interpreters, so a test run
# is effectively skipped and the test looks green if that's the case
script: ./all-tests.sh
Loading