OILS / test / configure-effects.sh View on Github | oils.pub

62 lines, 26 significant
1#!/usr/bin/env bash
2#
3# What happens if various build features aren't detected?
4# In Python and C++
5#
6# Usage:
7# test/configure-effects.sh <function name>
8
9set -o nounset
10set -o pipefail
11set -o errexit
12
13# bugs:
14# echo | tr
15# echo | cat
16# history | less
17
18prepare-cpp() {
19 ./NINJA-config.sh
20
21 # This overwrites the config
22 ./configure --without-readline --without-libc-features --without-systemtap-sdt
23
24 ninja
25}
26
27prepare-py() {
28 make
29}
30
31test-osh() {
32 local osh=$1
33
34 $osh -x -c 'set -o vi'
35 $osh -x -c 'set -o emacs'
36
37 # GLOB_PERIOD
38 $osh -x -c 'shopt -s dotglob'
39
40 # FNM_EXTMATCH
41 # Hm this will works
42 $osh -x -c 'echo */@(*.bash|*.asdl)'
43
44 # HAVE_PWENT
45 $osh -x -c 'compgen -A user'
46}
47
48cpp() {
49 #prepare
50
51 test-osh _bin/cxx-asan/osh
52}
53
54py() {
55 #prepare-py
56
57 ln -s -f -v oil.ovm _bin/osh
58
59 test-osh _bin/osh
60}
61
62"$@"