Index: tests/regression/Makefile.am
===================================================================
--- tests/regression/Makefile.am	(revision 80ca2949199193b6a0fde7517836465c5a7a214a)
+++ tests/regression/Makefile.am	(revision 006e1ed7d5cc4416cfbfad21491bcfc0fcdda3ce)
@@ -134,4 +134,5 @@
 	$(srcdir)/Parser/Tremolo/testsuite-parser-tremolo-load-multiply.at \
 	$(srcdir)/Parser/Tremolo/testsuite-parser-tremolo-save.at \
+	$(srcdir)/Parser/Tremolo-Exttypes/testsuite-parser-tremolo-save-selected-atoms-as-exttypes.at \
 	$(srcdir)/Parser/Tremolo-Potentials/testsuite-parser-tremolo-potentials.at \
 	$(srcdir)/Parser/Tremolo-Potentials/testsuite-parser-tremolo-potentials-load.at \
Index: tests/regression/Parser/Tremolo-Exttypes/post/test-right.exttypes
===================================================================
--- tests/regression/Parser/Tremolo-Exttypes/post/test-right.exttypes	(revision 006e1ed7d5cc4416cfbfad21491bcfc0fcdda3ce)
+++ tests/regression/Parser/Tremolo-Exttypes/post/test-right.exttypes	(revision 006e1ed7d5cc4416cfbfad21491bcfc0fcdda3ce)
@@ -0,0 +1,2 @@
+1	1
+2	1
Index: tests/regression/Parser/Tremolo-Exttypes/post/test-wrong.exttypes
===================================================================
--- tests/regression/Parser/Tremolo-Exttypes/post/test-wrong.exttypes	(revision 006e1ed7d5cc4416cfbfad21491bcfc0fcdda3ce)
+++ tests/regression/Parser/Tremolo-Exttypes/post/test-wrong.exttypes	(revision 006e1ed7d5cc4416cfbfad21491bcfc0fcdda3ce)
@@ -0,0 +1,2 @@
+-1	1
+-1	1
Index: tests/regression/Parser/Tremolo-Exttypes/pre/test.xyz
===================================================================
--- tests/regression/Parser/Tremolo-Exttypes/pre/test.xyz	(revision 006e1ed7d5cc4416cfbfad21491bcfc0fcdda3ce)
+++ tests/regression/Parser/Tremolo-Exttypes/pre/test.xyz	(revision 006e1ed7d5cc4416cfbfad21491bcfc0fcdda3ce)
@@ -0,0 +1,4 @@
+2
+	Created by molecuilder on Mon Apr 18 10:21:43 2011, time step 0
+Ar	4.72977	8	8
+Ar	7.3	8	8
Index: tests/regression/Parser/Tremolo-Exttypes/testsuite-parser-tremolo-save-selected-atoms-as-exttypes.at
===================================================================
--- tests/regression/Parser/Tremolo-Exttypes/testsuite-parser-tremolo-save-selected-atoms-as-exttypes.at	(revision 006e1ed7d5cc4416cfbfad21491bcfc0fcdda3ce)
+++ tests/regression/Parser/Tremolo-Exttypes/testsuite-parser-tremolo-save-selected-atoms-as-exttypes.at	(revision 006e1ed7d5cc4416cfbfad21491bcfc0fcdda3ce)
@@ -0,0 +1,17 @@
+### parsing tremolo
+
+AT_SETUP([Parser - save atoms as exttypes files])
+AT_KEYWORDS([parser tremolo save-selected-atoms-as-exttypes])
+
+file=test.xyz
+typesfiles=test-wrong.exttypes
+AT_CHECK([/bin/cp ${abs_top_srcdir}/tests/regression/Parser/Tremolo-Exttypes/pre/$file $file], 0, [ignore], [ignore])
+AT_CHECK([chmod u+w $file])
+AT_CHECK([../../molecuilder -i $file --select-all-atoms --save-selected-atoms-as-exttypes 1 --filename $typesfiles], 5, [stdout], [ignore])
+AT_CHECK([diff $typesfiles ${abs_top_srcdir}/tests/regression/Parser/Tremolo-Exttypes/post/$typesfiles], 0, [ignore], [ignore])
+
+typesfiles=test-right.exttypes
+AT_CHECK([../../molecuilder -i $file --select-all-atoms --save-selected-atoms test.data --save-selected-atoms-as-exttypes 1 --filename $typesfiles], 0, [stdout], [ignore])
+AT_CHECK([diff $typesfiles ${abs_top_srcdir}/tests/regression/Parser/Tremolo-Exttypes/post/$typesfiles], 0, [ignore], [ignore])
+
+AT_CLEANUP
Index: tests/regression/Parser/testsuite-parser.at
===================================================================
--- tests/regression/Parser/testsuite-parser.at	(revision 80ca2949199193b6a0fde7517836465c5a7a214a)
+++ tests/regression/Parser/testsuite-parser.at	(revision 006e1ed7d5cc4416cfbfad21491bcfc0fcdda3ce)
@@ -58,4 +58,7 @@
 m4_include([Parser/Tremolo-SetAtomdata/testsuite-parser-tremolo-setatomdata.at])
 
+# writing and exttypes file
+m4_include([Parser/Tremolo-Exttypes/testsuite-parser-tremolo-save-selected-atoms-as-exttypes.at])
+
 # parsing xyz
 m4_include([Parser/Xyz/testsuite-parser-xyz-empty.at])
