scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit 463b26a80002bff35a9c4a660ad46e0ae620d91f
parent aecf1b5658fbced93ba4e6018232528fb73cddca
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Mon, 12 Mar 2018 22:08:17 +0100

[tests/nm] Add tests for P format to z80

Diffstat:
Atests/nm/execute/0009-z80-P-o.sh | 33+++++++++++++++++++++++++++++++++
Atests/nm/execute/0010-z80-P-d.sh | 33+++++++++++++++++++++++++++++++++
Atests/nm/execute/0011-z80-P-x.sh | 33+++++++++++++++++++++++++++++++++
3 files changed, 99 insertions(+), 0 deletions(-)

diff --git a/tests/nm/execute/0009-z80-P-o.sh b/tests/nm/execute/0009-z80-P-o.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +set -e + +tmp1=`mktemp` +tmp2=`mktemp` +trap "rm -f $tmp1 $tmp2" 0 2 3 + +nm -P -t o z80.out > $tmp1 + +cat <<! > $tmp2 +.bss b 0000000000000000 0 +.data d 0000000000000000 0 +.text t 0000000000000000 0 +averylongbss B 0000000000000001 0 +averylongdata D 0000000000000001 0 +averylongtext T 0000000000000001 0 +bss1 B 0000000000000000 0 +bss3 b 0000000000000002 0 +bss4 C 0000000000000012 12 +bss5 C 0000000000000022 22 +data1 D 0000000000000000 0 +data3 d 0000000000000002 0 +data4 C 0000000000000012 12 +data5 C 0000000000000022 22 +text1 T 0000000000000000 0 +text3 t 0000000000000002 0 +text4 C 0000000000000012 12 +text5 C 0000000000000022 22 +text6 U +! + +diff $tmp1 $tmp2 diff --git a/tests/nm/execute/0010-z80-P-d.sh b/tests/nm/execute/0010-z80-P-d.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +set -e + +tmp1=`mktemp` +tmp2=`mktemp` +trap "rm -f $tmp1 $tmp2" 0 2 3 + +nm -P -t x z80.out > $tmp1 + +cat <<! > $tmp2 +.bss b 0000000000000000 0 +.data d 0000000000000000 0 +.text t 0000000000000000 0 +averylongbss B 0000000000000001 0 +averylongdata D 0000000000000001 0 +averylongtext T 0000000000000001 0 +bss1 B 0000000000000000 0 +bss3 b 0000000000000002 0 +bss4 C 000000000000000a a +bss5 C 0000000000000012 12 +data1 D 0000000000000000 0 +data3 d 0000000000000002 0 +data4 C 000000000000000a a +data5 C 0000000000000012 12 +text1 T 0000000000000000 0 +text3 t 0000000000000002 0 +text4 C 000000000000000a a +text5 C 0000000000000012 12 +text6 U +! + +diff $tmp1 $tmp2 diff --git a/tests/nm/execute/0011-z80-P-x.sh b/tests/nm/execute/0011-z80-P-x.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +set -e + +tmp1=`mktemp` +tmp2=`mktemp` +trap "rm -f $tmp1 $tmp2" 0 2 3 + +nm -P -t x z80.out > $tmp1 + +cat <<! > $tmp2 +.bss b 0000000000000000 0 +.data d 0000000000000000 0 +.text t 0000000000000000 0 +averylongbss B 0000000000000001 0 +averylongdata D 0000000000000001 0 +averylongtext T 0000000000000001 0 +bss1 B 0000000000000000 0 +bss3 b 0000000000000002 0 +bss4 C 000000000000000a a +bss5 C 0000000000000012 12 +data1 D 0000000000000000 0 +data3 d 0000000000000002 0 +data4 C 000000000000000a a +data5 C 0000000000000012 12 +text1 T 0000000000000000 0 +text3 t 0000000000000002 0 +text4 C 000000000000000a a +text5 C 0000000000000012 12 +text6 U +! + +diff $tmp1 $tmp2