view scripts/test/expr.test @ 1423:8059cfd67acd draft

Building busybox from source needs find -not (a synonym for posix's "!").
author Rob Landley <rob@landley.net>
date Tue, 05 Aug 2014 19:32:44 -0500
parents 74b5cf0309fc
children
line wrap: on
line source

#!/bin/bash

[ -f testing.sh ] && . testing.sh

testing "expr integer" "expr 5" "5\n" "" ""
testing "expr integer negative" "expr -5" "-5\n" "" ""
testing "expr string" "expr astring" "astring\n" "" ""
testing "expr 1 + 3" "expr 1 + 3" "4\n" "" ""
testing "expr 5 + 6 * 3" "expr 5 + 6 \* 3" "23\n" "" ""
testing "expr ( 5 + 6 ) * 3" "expr \( 5 + 6 \) \* 3" "33\n" "" ""