OILS / test / bugs.sh View on Github | oilshell.org

43 lines, 21 significant
1#!/usr/bin/env bash
2#
3# Junk drawer of repros for bugs
4#
5# Usage:
6# test/bugs.sh <function name>
7
8set -o nounset
9set -o pipefail
10set -o errexit
11
12# bugs:
13# echo | tr
14# echo | cat
15# history | less
16
17esrch-code-1() {
18 local n=$1
19 for i in $(seq $n); do
20 echo 'echo hi | tr a-z A-Z'
21 #echo 'echo hi | cat'
22 done
23}
24
25esrch-code-2() {
26 local n=$1
27 for i in $(seq $n); do
28 echo 'history | less'
29 done
30}
31
32esrch-test() {
33 # I think
34
35 local osh=bin/osh
36
37 local osh=_bin/cxx-opt/osh
38 ninja $osh
39
40 esrch-code-1 1000 | $osh -i
41}
42
43"$@"