annotate tests/printf.test @ 1499:319e79bab052 draft

Separate more commands so single.sh can build them standalone.
author Rob Landley <rob@landley.net>
date Fri, 26 Sep 2014 18:42:23 -0500
parents 8700cbe1cb29
children 35c035b7e3e0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1364
94677e7b6d97 I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
1 #!/bin/bash
94677e7b6d97 I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
2
94677e7b6d97 I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
3 # Copyright 2013 Robin Mittal <robinmittal.it@gmail.com>
94677e7b6d97 I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
4 # Copyright 2013 Divya Kothari <divya.s.kothari@gmail.com>
94677e7b6d97 I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
5
94677e7b6d97 I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
6 [ -f testing.sh ] && . testing.sh
94677e7b6d97 I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
7
94677e7b6d97 I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
8 #testing "name" "command" "result" "infile" "stdin"
94677e7b6d97 I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
9 #set -x
94677e7b6d97 I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
10
94677e7b6d97 I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
11 testing "printf TEXT" "printf toyTestText" "toyTestText" "" ""
94677e7b6d97 I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
12 testing "printf MULTILINE_TEXT" \
94677e7b6d97 I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
13 "printf 'Testing\nmultiline\ntext\nfrom\ntoybox\tcommand.\b'" \
94677e7b6d97 I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
14 "Testing\nmultiline\ntext\nfrom\ntoybox\tcommand.\b" "" ""
94677e7b6d97 I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
15 testing "printf '%5d%4d' 1 21 321 4321 54321" \
94677e7b6d97 I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
16 "printf '%5d%4d' 1 21 321 4321 54321" " 1 21 321432154321 0" "" ""
94677e7b6d97 I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
17 testing "printf '%c %c' 78 79" "printf '%c %c' 78 79" "7 7" "" ""
94677e7b6d97 I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
18 testing "printf '%d %d' 78 79" "printf '%d %d' 78 79" "78 79" "" ""
94677e7b6d97 I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
19 testing "printf '%f %f' 78 79" "printf '%f %f' 78 79" \
94677e7b6d97 I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
20 "78.000000 79.000000" "" ""
94677e7b6d97 I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
21 testing "printf 'f f' 78 79" "printf 'f f' 78 79" "f f" "" ""
94677e7b6d97 I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
22 testing "printf '%i %i' 78 79" "printf '%i %i' 78 79" "78 79" "" ""
94677e7b6d97 I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
23 testing "printf '%o %o' 78 79" "printf '%o %o' 78 79" "116 117" "" ""
94677e7b6d97 I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
24 testing "printf '%u %u' 78 79" "printf '%u %u' 78 79" "78 79" "" ""
94677e7b6d97 I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
25 testing "printf '%u %u' -1 -2" "printf '%u %u' -1 -2" \
94677e7b6d97 I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
26 "18446744073709551615 18446744073709551614" "" ""
94677e7b6d97 I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
27 testing "printf '%x %X' 78 79" "printf '%x %X' 78 79" "4e 4F" "" ""
94677e7b6d97 I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
28 testing "printf '%g %G' 78 79" "printf '%g %G' 78 79" "78 79" "" ""
94677e7b6d97 I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
29 testing "printf '%s %s' 78 79" "printf '%s %s' 78 79" "78 79" "" ""