diff options
author | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2017-03-06 21:29:17 -0500 |
---|---|---|
committer | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2017-03-06 21:29:17 -0500 |
commit | ba399f4366c1a43fe7975f8df70664397d804cc4 (patch) | |
tree | e2b263a967eb4432b65907c19b34bab5fdd1d26b | |
parent | e5261cf0bb2b565661e5e4d1be4a78c64c501b34 (diff) | |
download | egawk-ba399f4366c1a43fe7975f8df70664397d804cc4.tar.gz egawk-ba399f4366c1a43fe7975f8df70664397d804cc4.tar.bz2 egawk-ba399f4366c1a43fe7975f8df70664397d804cc4.zip |
Add new test readdir_test to check whether API get_record field_width parsing is working.
-rw-r--r-- | extension/Makefile.in | 14 | ||||
-rw-r--r-- | test/ChangeLog | 7 | ||||
-rw-r--r-- | test/Makefile.am | 8 | ||||
-rw-r--r-- | test/Makefile.in | 8 |
4 files changed, 28 insertions, 9 deletions
diff --git a/extension/Makefile.in b/extension/Makefile.in index 5d82045c..c3aba973 100644 --- a/extension/Makefile.in +++ b/extension/Makefile.in @@ -526,11 +526,11 @@ pkgextension_LTLIBRARIES = \ revoutput.la \ revtwoway.la \ rwarray.la \ + testext.la \ time.la noinst_LTLIBRARIES = \ - readdir_test.la \ - testext.la + readdir_test.la MY_MODULE_FLAGS = -module -avoid-version -no-undefined # on Cygwin, gettext requires that we link with -lintl @@ -570,13 +570,13 @@ rwarray_la_LIBADD = $(MY_LIBS) time_la_SOURCES = time.c time_la_LDFLAGS = $(MY_MODULE_FLAGS) time_la_LIBADD = $(MY_LIBS) +testext_la_SOURCES = testext.c +testext_la_LDFLAGS = $(MY_MODULE_FLAGS) +testext_la_LIBADD = $(MY_LIBS) -# N.B. Because we are not installing testext, we must specify -rpath in +# N.B. Because we are not installing readdir_test, we must specify -rpath in # LDFLAGS to get automake to build a shared library, since it needs # an installation path. -testext_la_SOURCES = testext.c -testext_la_LDFLAGS = $(MY_MODULE_FLAGS) -rpath /foo -testext_la_LIBADD = $(MY_LIBS) readdir_test_la_SOURCES = readdir_test.c readdir_test_la_LDFLAGS = $(MY_MODULE_FLAGS) -rpath /foo readdir_test_la_LIBADD = $(MY_LIBS) @@ -731,7 +731,7 @@ rwarray.la: $(rwarray_la_OBJECTS) $(rwarray_la_DEPENDENCIES) $(EXTRA_rwarray_la_ $(AM_V_CCLD)$(rwarray_la_LINK) -rpath $(pkgextensiondir) $(rwarray_la_OBJECTS) $(rwarray_la_LIBADD) $(LIBS) testext.la: $(testext_la_OBJECTS) $(testext_la_DEPENDENCIES) $(EXTRA_testext_la_DEPENDENCIES) - $(AM_V_CCLD)$(testext_la_LINK) $(testext_la_OBJECTS) $(testext_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(testext_la_LINK) -rpath $(pkgextensiondir) $(testext_la_OBJECTS) $(testext_la_LIBADD) $(LIBS) time.la: $(time_la_OBJECTS) $(time_la_DEPENDENCIES) $(EXTRA_time_la_DEPENDENCIES) $(AM_V_CCLD)$(time_la_LINK) -rpath $(pkgextensiondir) $(time_la_OBJECTS) $(time_la_LIBADD) $(LIBS) diff --git a/test/ChangeLog b/test/ChangeLog index b0ca5a97..acd2bf72 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,10 @@ +2017-03-06 Andrew J. Schorr <aschorr@telemetry-investments.com> + + * Makefile.am (readdir_test): New test to check whether get_record + field_width parsing is working by comparing the results from the + readdir and readdir_test extensions. + (SHLIB_TESTS): Add readdir_test. + 2017-02-21 Andrew J. Schorr <aschorr@telemetry-investments.com> * Makefile.am (mktime): New test. diff --git a/test/Makefile.am b/test/Makefile.am index 65336b6c..c41e9dd9 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1263,7 +1263,7 @@ LOCALE_CHARSET_TESTS = \ SHLIB_TESTS = \ apiterm fnmatch filefuncs fork fork2 fts functab4 getfile inplace1 inplace2 inplace3 \ - ordchr ordchr2 readdir readfile readfile2 revout revtwoway rwarray testext time + ordchr ordchr2 readdir readdir_test readfile readfile2 revout revtwoway rwarray testext time # List of the tests which should be run with --lint option: NEED_LINT = \ @@ -2193,6 +2193,12 @@ readdir: -v dirlist=_dirlist -v longlist=_longlist > $@.ok @-$(CMP) $@.ok _$@ && rm -f $@.ok _$@ _dirlist _longlist +readdir_test: + @echo $@ + @$(AWK) -lreaddir -F/ '{printf "[%s] [%s] [%s] [%s]\n", $$1, $$2, $$3, $$4}' "$(top_srcdir)" > $@.ok + @$(AWK) -lreaddir_test '{printf "[%s] [%s] [%s] [%s]\n", $$1, $$2, $$3, $$4}' "$(top_srcdir)" > _$@ + @-$(CMP) $@.ok _$@ && rm -f $@.ok _$@ + fts: @case `uname` in \ IRIX) \ diff --git a/test/Makefile.in b/test/Makefile.in index 1a61996f..c07bc6d7 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1516,7 +1516,7 @@ LOCALE_CHARSET_TESTS = \ SHLIB_TESTS = \ apiterm fnmatch filefuncs fork fork2 fts functab4 getfile inplace1 inplace2 inplace3 \ - ordchr ordchr2 readdir readfile readfile2 revout revtwoway rwarray testext time + ordchr ordchr2 readdir readdir_test readfile readfile2 revout revtwoway rwarray testext time # List of the tests which should be run with --lint option: @@ -2632,6 +2632,12 @@ readdir: -v dirlist=_dirlist -v longlist=_longlist > $@.ok @-$(CMP) $@.ok _$@ && rm -f $@.ok _$@ _dirlist _longlist +readdir_test: + @echo $@ + @$(AWK) -lreaddir -F/ '{printf "[%s] [%s] [%s] [%s]\n", $$1, $$2, $$3, $$4}' "$(top_srcdir)" > $@.ok + @$(AWK) -lreaddir_test '{printf "[%s] [%s] [%s] [%s]\n", $$1, $$2, $$3, $$4}' "$(top_srcdir)" > _$@ + @-$(CMP) $@.ok _$@ && rm -f $@.ok _$@ + fts: @case `uname` in \ IRIX) \ |