|
| 1 | +##################################################################################################### |
| 2 | +# TESTING json_test.sh |
| 3 | +##################################################################################################### |
| 4 | +________________________________________________________________________________________________ |
| 5 | +RUNNING > 'json package.json' |
| 6 | +................................................................ |
| 7 | +{ |
| 8 | + "name": "test", |
| 9 | + "version": "1.2.3", |
| 10 | + "description": "See if the json program works well", |
| 11 | + "list": [ |
| 12 | + "item1", |
| 13 | + "item2", |
| 14 | + "item3", |
| 15 | + "item4" |
| 16 | + ] |
| 17 | +} |
| 18 | +................................................................ |
| 19 | +________________________________________________________________________________________________ |
| 20 | +________________________________________________________________________________________________ |
| 21 | +RUNNING > 'json package.json $' |
| 22 | +................................................................ |
| 23 | +{ name: 'test', |
| 24 | + version: '1.2.3', |
| 25 | + description: 'See if the json program works well', |
| 26 | + list: [ 'item1', 'item2', 'item3', 'item4' ] } |
| 27 | +................................................................ |
| 28 | +________________________________________________________________________________________________ |
| 29 | +________________________________________________________________________________________________ |
| 30 | +RUNNING > 'json package.json $.description' |
| 31 | +................................................................ |
| 32 | +See if the json program works well |
| 33 | +................................................................ |
| 34 | +________________________________________________________________________________________________ |
| 35 | +________________________________________________________________________________________________ |
| 36 | +RUNNING > 'json package.json '$.list.map(x=>`${$.name}_${x.toUpperCase()}`)'' |
| 37 | +................................................................ |
| 38 | +[ 'test_ITEM1', 'test_ITEM2', 'test_ITEM3', 'test_ITEM4' ] |
| 39 | +................................................................ |
| 40 | +________________________________________________________________________________________________ |
| 41 | +##################################################################################################### |
0 commit comments