&control.Tmp-String-1 := 'foo\nbar'
linelog_escapes
-&Tmp-String-0 := `/bin/sh -c "tail -n1 $ENV{MODULE_TEST_DIR}/test_escapes.log"`
+&Tmp-String-0 := %file.tail("$ENV{MODULE_TEST_DIR}/test_escapes.log")
&Tmp-String-1 := "%hex(%{Tmp-String-0})"
#
test_fail
}
-&Tmp-String-0 := `/bin/sh -c "tail -n1 $ENV{MODULE_TEST_DIR}/test_escapes.log"`
+&Tmp-String-0 := %file.tail("$ENV{MODULE_TEST_DIR}/test_escapes.log")
#
# This is left alone, and not "\n" --> 0x0a, too.
test_fail
}
-&Tmp-String-0 := `/bin/sh -c "tail -n1 $ENV{MODULE_TEST_DIR}/test_escapes.log"`
+&Tmp-String-0 := %file.tail("$ENV{MODULE_TEST_DIR}/test_escapes.log")
if (&Tmp-String-0 == "bar") {
test_pass
}
linelog_ref_multi
-&Tmp-String-0 := `/bin/sh -c "tail -n1 $ENV{MODULE_TEST_DIR}/test_multi.log"`
+&Tmp-String-0 := %file.tail("$ENV{MODULE_TEST_DIR}/test_multi.log")
if (&Tmp-String-0 == '0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ') {
test_pass
linelog_ref_multi
-&Tmp-String-0 := `/bin/sh -c "tail -n1 $ENV{MODULE_TEST_DIR}/test_multi.log"`
+&Tmp-String-0 := %file.tail("$ENV{MODULE_TEST_DIR}/test_multi.log")
if (&Tmp-String-0 == ', blippo, ') {
test_pass
&control.Tmp-String-0 := 'test_default'
linelog_fmt_and_ref
-&Tmp-String-0 := `/bin/sh -c "tail -n1 $ENV{MODULE_TEST_DIR}/test_a.log"`
+&Tmp-String-0 := %file.tail("$ENV{MODULE_TEST_DIR}/test_a.log")
if (&Tmp-String-0 == 'bob default') {
test_pass
linelog_fmt_and_ref
-&Tmp-String-0 := `/bin/sh -c "tail -n1 $ENV{MODULE_TEST_DIR}/test_a.log"`
+&Tmp-String-0 := %file.tail("$ENV{MODULE_TEST_DIR}/test_a.log")
if (&Tmp-String-0 == 'bob exec') {
test_pass
linelog_fmt_and_ref
-&Tmp-String-0 := `/bin/sh -c "tail -n1 $ENV{MODULE_TEST_DIR}/test_a.log"`
+&Tmp-String-0 := %file.tail("$ENV{MODULE_TEST_DIR}/test_a.log")
if (&Tmp-String-0 == 'bob') {
test_pass
linelog_fmt_and_ref
-&Tmp-String-0 := `/bin/sh -c "tail -n1 $ENV{MODULE_TEST_DIR}/test_a.log"`
+&Tmp-String-0 := %file.tail("$ENV{MODULE_TEST_DIR}/test_a.log")
if (&Tmp-String-0 == 'bob xlat') {
test_pass
linelog_fmt_and_ref
-&Tmp-String-0 := `/bin/sh -c "tail -n1 $ENV{MODULE_TEST_DIR}/test_a.log"`
+&Tmp-String-0 := %file.tail("$ENV{MODULE_TEST_DIR}/test_a.log")
if (&Tmp-String-0 == '%{User-Name} literal') {
test_pass
linelog_fmt_and_ref
-&Tmp-String-0 := `/bin/sh -c "tail -n1 $ENV{MODULE_TEST_DIR}/test_a.log"`
+&Tmp-String-0 := %file.tail("$ENV{MODULE_TEST_DIR}/test_a.log")
if (&Tmp-String-0 == '') {
test_pass
linelog_ref
-&Tmp-String-0 := `/bin/sh -c "tail -n1 $ENV{MODULE_TEST_DIR}/test_b.log"`
+&Tmp-String-0 := %file.tail("$ENV{MODULE_TEST_DIR}/test_b.log")
if (&Tmp-String-0 == 'bob exec') {
test_pass
&control.Tmp-String-0 := '.messages.test_xlat'
linelog_fmt_and_ref_attr
-&Tmp-String-0 := `/bin/sh -c "tail -n1 $ENV{MODULE_TEST_DIR}/test_c.log"`
+&Tmp-String-0 := %file.tail("$ENV{MODULE_TEST_DIR}/test_c.log")
if (&Tmp-String-0 == 'bob xlat') {
test_pass
&control.Tmp-String-0 := 'test_xlat'
linelog_fmt_and_ref_attr
-&Tmp-String-0 := `/bin/sh -c "tail -n1 $ENV{MODULE_TEST_DIR}/test_c.log"`
+&Tmp-String-0 := %file.tail("$ENV{MODULE_TEST_DIR}/test_c.log")
if (&Tmp-String-0 == 'bob') {
test_pass
&control.Tmp-String-0 := 'messages.test_xlat'
linelog_fmt_and_ref_attr
-&Tmp-String-0 := `/bin/sh -c "tail -n1 $ENV{MODULE_TEST_DIR}/test_c.log"`
+&Tmp-String-0 := %file.tail("$ENV{MODULE_TEST_DIR}/test_c.log")
if (&Tmp-String-0 == 'bob xlat') {
test_pass
test_fail
}
-&Tmp-String-0 := `/bin/sh -c "tail -n1 $ENV{MODULE_TEST_DIR}/test_c.log"`
+&Tmp-String-0 := %file.tail("$ENV{MODULE_TEST_DIR}/test_c.log")
if (&Tmp-String-0 == 'bob xlat') {
test_pass
linelog_fmt
-&Tmp-String-0 := `/bin/sh -c "tail -n1 $ENV{MODULE_TEST_DIR}/test_d.log"`
+&Tmp-String-0 := %file.tail("$ENV{MODULE_TEST_DIR}/test_d.log")
if (&Tmp-String-0 == 'bob') {
test_pass
test_fail
}
-&Tmp-String-0 := `/bin/sh -c "tail -n1 $ENV{MODULE_TEST_DIR}/test_e.log"`
+&Tmp-String-0 := %file.tail("$ENV{MODULE_TEST_DIR}/test_e.log")
if (&Tmp-String-0 == 'bob,olobobob') {
test_pass
linelog_header
-&Tmp-String-0 := `/bin/sh -c "tail -n1 $ENV{MODULE_TEST_DIR}/test_e.log"`
+&Tmp-String-0 := %file.tail("$ENV{MODULE_TEST_DIR}/test_e.log")
if (&Tmp-String-0 == 'bob,olobobob') {
test_pass
if (%{linelog_fmt_delim_xlat:bob} != 5) {
test_fail
}
-&Tmp-String-0 := `/bin/sh -c "tail -n1 $ENV{MODULE_TEST_DIR}/test_xlat.log"`
+&Tmp-String-0 := %file.tail("$ENV{MODULE_TEST_DIR}/test_xlat.log")
if (&Tmp-String-0 == 'bob, ') {
test_pass
if (%{linelog_fmt_delim_xlat:%{Tmp-String-1}%{Tmp-String-2}} != 9) {
test_fail
}
-&Tmp-String-0 := `/bin/sh -c "tail -n1 $ENV{MODULE_TEST_DIR}/test_xlat.log"`
+&Tmp-String-0 := %file.tail("$ENV{MODULE_TEST_DIR}/test_xlat.log")
if (&Tmp-String-0 == 'bob, morebob, ') {
test_pass
}
test_fail
}
-&Tmp-String-0 := `/bin/sh -c "tail -n1 $ENV{MODULE_TEST_DIR}/test_xlat.log"`
+&Tmp-String-0 := %file.tail("$ENV{MODULE_TEST_DIR}/test_xlat.log")
if (&Tmp-String-0 == '{ "foo" : "bar", "baz" : "boink" }, ') {
test_pass