blob: 2ec557a33ee3f37ceebc58a2297360472303f213 [file] [log] [blame]
Rob Landley2a53f532014-08-01 09:08:00 -05001#!/bin/bash
2
3[ -f testing.sh ] && . testing.sh
4
5#testing "name" "command" "result" "infile" "stdin"
6
Rob Landley336c44a2016-03-02 15:20:04 -06007testing "-32" "factor -32" "-32: -1 2 2 2 2 2\n" "" ""
8testing "0" "factor 0" "0: 0\n" "" ""
9testing "1" "factor 1" "1: 1\n" "" ""
10testing "2" "factor 2" "2: 2\n" "" ""
11testing "3" "factor 3" "3: 3\n" "" ""
12testing "4" "factor 4" "4: 2 2\n" "" ""
13testing "10000000017" "factor 10000000017" \
Rob Landley2a53f532014-08-01 09:08:00 -050014 "10000000017: 3 3 3 7 7 7 1079797\n" "" ""
Rob Landley336c44a2016-03-02 15:20:04 -060015testing "10000000018" "factor 10000000018" \
Rob Landley2a53f532014-08-01 09:08:00 -050016 "10000000018: 2 131 521 73259\n" "" ""
Rob Landley336c44a2016-03-02 15:20:04 -060017testing "10000000019" "factor 10000000019" \
Rob Landley2a53f532014-08-01 09:08:00 -050018 "10000000019: 10000000019\n" "" ""
Rob Landley4391e572014-12-24 16:13:08 -060019
Rob Landley336c44a2016-03-02 15:20:04 -060020testing "3 6 from stdin" "factor" "3: 3\n6: 2 3\n" "" "3 6"
21testing "stdin newline" "factor" "3: 3\n6: 2 3\n" "" "3\n6\n"
Rob Landley4391e572014-12-24 16:13:08 -060022