view scripts/test/expr.test @ 1349:bf2e5591bdf0 draft

Cleanup strings.
author Rob Landley <rob@landley.net>
date Wed, 11 Jun 2014 08:02:55 -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" "" ""