OILS / benchmarks / id-test.sh View on Github | oilshell.org

41 lines, 25 significant
1#!/usr/bin/env bash
2#
3# Usage:
4# benchmarks/id-test.sh <function name>
5
6: ${LIB_OSH=stdlib/osh}
7source $LIB_OSH/bash-strict.sh
8source $LIB_OSH/no-quotes.sh
9
10source benchmarks/id.sh
11source test/common.sh # run-test-funcs
12
13test-shell-prov() {
14 shell-provenance-2 no-host 2022-12-29 _tmp/ \
15 bin/osh
16}
17
18test-out-param() {
19 local mylocal
20
21 out-param mylocal
22 nq-assert "$mylocal" = 'returned'
23
24 echo "mylocal=$mylocal"
25}
26
27test-compiler-id() {
28 dump-compiler-id $(which gcc)
29
30 if test -f $CLANG; then
31 dump-compiler-id $CLANG
32 fi
33
34 head _tmp/compiler-id/*/version.txt
35}
36
37soil-run() {
38 run-test-funcs
39}
40
41"$@"