From 3e400c3df5572524b7ba08b030f45eb3ba6b7734 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Fri, 17 Sep 2021 22:08:50 +0200 Subject: Add database helper functions --- t/post.t | 8 +++++++- t/post.tc | 14 +++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) (limited to 't') diff --git a/t/post.t b/t/post.t index a74f29a..56d3c37 100644 --- a/t/post.t +++ b/t/post.t @@ -1 +1,7 @@ -

Post <% printf("%d", id); %>

+

Post <% printf("%d", id); %>: <%= post->subject %>

+

From: <%= user->full %> +<id); %>"><%= user->name %>> +
Date: <% PFREE(date(post->created)); %> +

+<%= post->text %>
+
\ No newline at end of file diff --git a/t/post.tc b/t/post.tc index 7c36950..2f81de0 100644 --- a/t/post.tc +++ b/t/post.tc @@ -1,3 +1,15 @@ printf("

Post "); printf("%d", id); -printf("

\n"); +printf(": "); +printf("%s", post->subject ); +printf("\n

From: "); +printf("%s", user->full ); +printf("\n<id); +printf("\">"); +printf("%s", user->name ); +printf(">\n
Date: "); +PFREE(date(post->created)); +printf("\n

\n");
+printf("%s",  post->text );
+printf("\n
"); -- cgit v1.2.3