[0-9\.]{10}).*?09:15<\/td> | (?.*?)<\/td>.*?12:15<\/td> | (?.*?)<\/td>
-attr GeoTest getURL file://geocache-planer.de/CAL/anmeldung.php?date=%%date%%&CALID=XYZ
-attr GeoTest get01Replacement01Value {strftime("%d.%m.%Y", localtime( time))}
-
-attr GeoTest get02Name Test2
-#attr GeoTest get02Replacement01Value {my $NAME = "GeoTest" ;;fhem("deletereading ".$NAME." message");;fhem("deletereading ".$NAME." auth.*");;my @chars=('a'..'z','A'..'Z','0'..'9'); my $r; foreach(1..16) {$r.=$chars[rand @chars];};; fhem("setreading ".$NAME." auth_randomString64 ".$r);; $r;;}
-attr GeoTest get02Replacement01Value {my $NAME = "GeoTest" ;;fhem("deletereading ".$NAME." message");;fhem("deletereading ".$NAME." auth.*");;my @chars=('a'..'z','A'..'Z','0'..'9');; my $r;; foreach(1..16) {$r.=$chars[rand @chars];;};; fhem("setreading ".$NAME." auth_randomString64 ".$r);; $r;;}
-attr GeoTest get02Poll 1
+define GeoTest HTTPMOD none 0
+attr GeoTest minSendDelay 0
+attr GeoTest verbose 5
+attr GeoTest enableControlSet 1
+
+attr GeoTest replacement01Mode expression
+attr GeoTest replacement01Regex %%date%%
+
+attr GeoTest get01Name Tag01
+attr GeoTest get01Poll 1
+attr GeoTest get01Regex (?s)Zeit auswählen (?[A-Za-z]+).-.(?[0-9\.]{10}).*?09:15<\/td> | (?.*?)<\/td>.*?12:15<\/td> | (?.*?)<\/td>
+attr GeoTest getURL file://geocache-planer.de/CAL/anmeldung.php?date=%%date%%&CALID=XYZ
+attr GeoTest get01Replacement01Value {strftime("%d.%m.%Y", localtime( time))}
+
+attr GeoTest get02Name Test2
+#attr GeoTest get02Replacement01Value {my $NAME = "GeoTest" ;;fhem("deletereading ".$NAME." message");;fhem("deletereading ".$NAME." auth.*");;my @chars=('a'..'z','A'..'Z','0'..'9'); my $r; foreach(1..16) {$r.=$chars[rand @chars];};; fhem("setreading ".$NAME." auth_randomString64 ".$r);; $r;;}
+attr GeoTest get02Replacement01Value {my $NAME = "GeoTest" ;;fhem("deletereading ".$NAME." message");;fhem("deletereading ".$NAME." auth.*");;my @chars=('a'..'z','A'..'Z','0'..'9');; my $r;; foreach(1..16) {$r.=$chars[rand @chars];;};; fhem("setreading ".$NAME." auth_randomString64 ".$r);; $r;;}
+attr GeoTest get02Poll 1
diff --git a/fhem/t/FHEM/98_HTTPMOD/90_SmallFeatures.cfg b/fhem/t/FHEM/98_HTTPMOD/90_SmallFeatures.cfg
index 8e9562acf..58ac7351f 100644
--- a/fhem/t/FHEM/98_HTTPMOD/90_SmallFeatures.cfg
+++ b/fhem/t/FHEM/98_HTTPMOD/90_SmallFeatures.cfg
@@ -1,17 +1,17 @@
-define H2 HTTPMOD file://t/FHEM/98_HTTPMOD/Charset.testdata 0
-attr H2 verbose 5
-attr H2 fileHeaderSplit --end-of-http-header--
-attr H2 memReading 1
-attr H2 minSendDelay 0
-
-attr H2 reading01Name TestReading1
-attr H2 reading01Regex erraschung mit (.*)
-
-define H3 HTTPMOD file://t/FHEM/98_HTTPMOD/Charset.testdata2 0
-attr H3 verbose 5
-attr H3 fileHeaderSplit --end-of-http-header--
-attr H3 minSendDelay 0
-attr H3 bodyDecode auto
-attr H3 reading01Name Test
-attr H3 reading01Regex >([^ ]+) auf neue
+define H2 HTTPMOD file://t/FHEM/98_HTTPMOD/Charset.testdata 0
+attr H2 verbose 5
+attr H2 fileHeaderSplit --end-of-http-header--
+attr H2 memReading 1
+attr H2 minSendDelay 0
+
+attr H2 reading01Name TestReading1
+attr H2 reading01Regex erraschung mit (.*)
+
+define H3 HTTPMOD file://t/FHEM/98_HTTPMOD/Charset.testdata2 0
+attr H3 verbose 5
+attr H3 fileHeaderSplit --end-of-http-header--
+attr H3 minSendDelay 0
+attr H3 bodyDecode auto
+attr H3 reading01Name Test
+attr H3 reading01Regex >([^ ]+) auf neue
attr H3 reading01Encode none
\ No newline at end of file
diff --git a/fhem/t/FHEM/98_HTTPMOD/90_SmallFeatures.t b/fhem/t/FHEM/98_HTTPMOD/90_SmallFeatures.t
index 70f7ee7af..0eb34d581 100644
--- a/fhem/t/FHEM/98_HTTPMOD/90_SmallFeatures.t
+++ b/fhem/t/FHEM/98_HTTPMOD/90_SmallFeatures.t
@@ -12,7 +12,7 @@ $modVersion =~ /^([0-9]+)\./;
my $major = $1;
if ($major && $major >= 4) {
- plan tests => 9;
+ plan tests => 11;
} else {
plan skip_all => "This test only works for HTTPMOD version 4 or later, installed is $modVersion";
}
@@ -34,12 +34,19 @@ fhem('attr H2 readingEncode utf8');
fhem('set H2 reread');
is(FhemTestUtils_gotEvent("H2:TestReading1: \xc3\x84\x6e"), 1, "TestReading with body decode");
+
+CheckAndReset();
+fhem('attr H2 bodyDecode UTF8');
+fhem('attr H2 readingEncode utf8');
+fhem('set H2 reread');
+is(FhemTestUtils_gotEvent("H2:TestReading1: \xef\xbf\xbd"), 1, "TestReading with body decode UTF8");
+
CheckAndReset();
fhem('attr H2 dumpBuffers .');
fhem('attr H2 verbose 5');
fhem('set H2 reread');
-
# todo: check
+# problem: where can we write buffers (with permission) during testing?
CheckAndReset();
fhem 'set H3 reread';
diff --git a/fhem/t/FHEM/98_HTTPMOD/99_evalExpr.cfg b/fhem/t/FHEM/98_HTTPMOD/99_evalExpr.cfg
index 25ceb57f9..e56de3588 100644
--- a/fhem/t/FHEM/98_HTTPMOD/99_evalExpr.cfg
+++ b/fhem/t/FHEM/98_HTTPMOD/99_evalExpr.cfg
@@ -1,4 +1,4 @@
-define H2 HTTPMOD file://t/FHEM/98_HTTPMOD/JSON 0
-attr H2 verbose 5
-attr H2 get01Name TestGet
-attr H2 get01Data Post Data for Test
+define H2 HTTPMOD file://t/FHEM/98_HTTPMOD/JSON 0
+attr H2 verbose 5
+attr H2 get01Name TestGet
+attr H2 get01Data Post Data for Test
diff --git a/fhem/t/FHEM/98_HTTPMOD/Charset.testdata b/fhem/t/FHEM/98_HTTPMOD/Charset.testdata
index ffb292692..0f430d3e1 100644
--- a/fhem/t/FHEM/98_HTTPMOD/Charset.testdata
+++ b/fhem/t/FHEM/98_HTTPMOD/Charset.testdata
@@ -1,13 +1,13 @@
-HTTP/1.1 200 OK
-Content-Type: text/html; charset=cp437
---end-of-http-header--
-
-Test
-
-Test Data
- for HTTPMOD Test
-
-šberraschung mit Žnderungen ‚Š
-
-
-
+HTTP/1.1 200 OK
+Content-Type: text/html; charset=cp437
+--end-of-http-header--
+
+Test
+
+Test Data
+ for HTTPMOD Test
+
+šberraschung mit Žnderungen ‚Š
+
+
+
diff --git a/fhem/t/FHEM/98_HTTPMOD/Charset.testdata-utf8 b/fhem/t/FHEM/98_HTTPMOD/Charset.testdata-utf8
index 6d6fdaa93..dad77c265 100644
--- a/fhem/t/FHEM/98_HTTPMOD/Charset.testdata-utf8
+++ b/fhem/t/FHEM/98_HTTPMOD/Charset.testdata-utf8
@@ -1,14 +1,14 @@
-HTTP/1.1 200 OK
-Content-Type: text/html; charset=cp437
---end-of-http-header--
-
-Test
-
-Test Data
- for HTTPMOD Test
-
-Überraschung mit Änderungen éè
-kleine Umlaute: äöü
-
-
-
+HTTP/1.1 200 OK
+Content-Type: text/html; charset=cp437
+--end-of-http-header--
+
+Test
+
+Test Data
+ for HTTPMOD Test
+
+Überraschung mit Änderungen éè
+kleine Umlaute: äöü
+
+
+
diff --git a/fhem/t/FHEM/98_HTTPMOD/Charset.testdata2 b/fhem/t/FHEM/98_HTTPMOD/Charset.testdata2
index 928691a62..784dff12d 100644
--- a/fhem/t/FHEM/98_HTTPMOD/Charset.testdata2
+++ b/fhem/t/FHEM/98_HTTPMOD/Charset.testdata2
@@ -1,48 +1,48 @@
-HTTP/1.1 200 OK
-Content-Type: text/html; charset=utf-8
-Cache-Control: no-cache, no-store, must-revalidate
-Pragma: no-cache
-Expires: 0
-Length: unspecified
---end-of-http-header--
-
-
-
-BSB-LAN
-
-
-
-
-
-
-
-
+HTTP/1.1 200 OK
+Content-Type: text/html; charset=utf-8
+Cache-Control: no-cache, no-store, must-revalidate
+Pragma: no-cache
+Expires: 0
+Length: unspecified
+--end-of-http-header--
+
+
+
+BSB-LAN
+
+
+
+
+
+
+
+
\ No newline at end of file
| | | |