Here it is. I'm not using AS_ERROR to avoid dragging in AS_ME_PREPARE
otherwise, but the test fails anyway due to a non-empty stdout (I checked).
Paolo
2008-10-13 Paolo Bonzini <[EMAIL PROTECTED]>
* tests/m4sh.at ($as_me): New test.
diff --git a/tests/m4sh.at b/tests/m4sh.at
index 1692098..269f7b8 100644
--- a/tests/m4sh.at
+++ b/tests/m4sh.at
@@ -343,6 +343,27 @@ AT_CLEANUP
+## -------- ##
+## $as_me. ##
+## -------- ##
+
+AT_SETUP([$as_me])
+AT_KEYWORDS([m4sh])
+
+AT_DATA_M4SH([script.as],
+[[AS_INIT
+AS_ME_PREPARE
+test "$as_me" = script || AS_ECHO([["incorrect \$as_me: $as_me"]])
+]])
+
+AT_CHECK_M4SH
+AT_CHECK([./script])
+
+AT_CLEANUP
+
+
+
+
## ----------------------------- ##
## Negated classes in globbing. ##
## ----------------------------- ##