From f987ef0ff5bf220c8151c57495d95ee518b369f5 Mon Sep 17 00:00:00 2001 From: Constantin Rack Date: Tue, 12 Sep 2017 17:08:11 +0200 Subject: [PATCH] Problem: no test for issue #11 Solution: add teststr.gsl to make check and add non-matching search_replace to test See #11 --- src/Makefile | 1 + src/teststr.gsl | 1 + 2 files changed, 2 insertions(+) diff --git a/src/Makefile b/src/Makefile index dfbdd1e..e794945 100644 --- a/src/Makefile +++ b/src/Makefile @@ -198,6 +198,7 @@ test: everything check: gsl$(EXE) ./gsl$(EXE) testall + ./gsl$(EXE) teststr install: $(INSTALL) -m 755 -d "$(bindir)" diff --git a/src/teststr.gsl b/src/teststr.gsl index 1f2c35a..cf0f0f0 100644 --- a/src/teststr.gsl +++ b/src/teststr.gsl @@ -14,6 +14,7 @@ echo "certify: should be 'Two hundred and twelve million': " + rs str = "A fool and his guilt are soon parted." echo str echo string.replace (str, "guilt|honey") +echo string.search_replace (str, "money", "replacement") str = "A beautiful eye makes silence eloquent, a kind eye makes contradiction an assent, an enraged eye makes beauty deformed. This little member gives life