ref: 249cfc0d480adfc2b225761d7346b6aa114dc8f9
parent: d7c503ac9d395a3dbda13c4f2cb1265811df16e1
author: Roberto E. Vargas Caballero <[email protected]>
date: Mon Mar 12 18:08:17 EDT 2018
[tests/nm] Add tests for P format to z80
--- /dev/null
+++ b/tests/nm/execute/0009-z80-P-o.sh
@@ -1,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
--- /dev/null
+++ b/tests/nm/execute/0010-z80-P-d.sh
@@ -1,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
--- /dev/null
+++ b/tests/nm/execute/0011-z80-P-x.sh
@@ -1,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