Skip to content

Commit

Permalink
Uri test
Browse files Browse the repository at this point in the history
  • Loading branch information
bafto committed Nov 21, 2024
1 parent 8ce5d7d commit bd34153
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
12 changes: 1 addition & 11 deletions lib/stdlib/Duden/Uri.ddp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Die öffentliche Funktion Parse_Uri mit dem Parameter uri vom Typ Text, gibt ein
Gib ergebnis zurück.
Und überlädt den "als" Operator.

Die Funktion Uri_Zu_Text mit dem Parameter uri vom Typ Uri, gibt einen Text zurück, macht:
Die öffentliche Funktion Uri_Zu_Text mit dem Parameter uri vom Typ Uri, gibt einen Text zurück, macht:
[ TODO: durch TextBauer ersetzen ]
Der Text t ist "".

Expand Down Expand Up @@ -74,13 +74,3 @@ Die Funktion Uri_Zu_Text mit dem Parameter uri vom Typ Uri, gibt einen Text zur

Gib t zurück.
Und überlädt den "als" Operator.

Schreibe ab jetzt alle Fehler.
Der Text uri ist "http://bafto:[email protected]:8080/pub/ietf/uri/?a=5&b=6#Related".

Die Uri u ist uri als Uri.
Schreibe (u als Text) auf eine Zeile.

Der Text uri2 ist "/pub/ietf/uri/?a=5&b=6#Related".
Die Uri u2 ist uri2 als Uri.
Schreibe (u2 als Text) auf eine Zeile.
13 changes: 13 additions & 0 deletions tests/testdata/stdlib/Uri/Uri.ddp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Binde "Duden/Ausgabe" ein.
Binde "Duden/Uri" ein.

Die Uri u ist "https://user:[email protected]:8080/index.html?a=hi&b=bye#anchor" als Uri.

Schreibe (Schema von u) auf eine Zeile.
Schreibe (Nutzer von u) auf eine Zeile.
Schreibe (Host von u) auf eine Zeile.
Schreibe (Port von u) auf eine Zeile.
Schreibe (Pfad von u) auf eine Zeile.
Schreibe (Abfrage von u) auf eine Zeile.
Schreibe (Fragment von u) auf eine Zeile.
Schreibe (u als Text) auf eine Zeile.
8 changes: 8 additions & 0 deletions tests/testdata/stdlib/Uri/expected.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
https
user:password
example.com
8080
/index.html
a=hi&b=bye
anchor
https://user:[email protected]:8080/index.html?a=hi&b=bye#anchor

0 comments on commit bd34153

Please sign in to comment.