summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAnton L. Šijanec <anton@sijanec.eu>2020-05-03 21:00:05 +0200
committerAnton L. Šijanec <anton@sijanec.eu>2020-05-03 21:00:05 +0200
commitf80f005c602654abe137f152a5128c8abd81f9a7 (patch)
tree883df3ae2bb5873c34ea05a379122bd28db7a831 /test
parentfix glede na prejšnji komit (diff)
downloadbverbose-f80f005c602654abe137f152a5128c8abd81f9a7.tar
bverbose-f80f005c602654abe137f152a5128c8abd81f9a7.tar.gz
bverbose-f80f005c602654abe137f152a5128c8abd81f9a7.tar.bz2
bverbose-f80f005c602654abe137f152a5128c8abd81f9a7.tar.lz
bverbose-f80f005c602654abe137f152a5128c8abd81f9a7.tar.xz
bverbose-f80f005c602654abe137f152a5128c8abd81f9a7.tar.zst
bverbose-f80f005c602654abe137f152a5128c8abd81f9a7.zip
Diffstat (limited to '')
-rw-r--r--test/ram-test.c6
-rw-r--r--test/tape-test.bvr21
-rw-r--r--test/tape-test.c7
-rw-r--r--test/var-test.c9
4 files changed, 37 insertions, 6 deletions
diff --git a/test/ram-test.c b/test/ram-test.c
new file mode 100644
index 0000000..8ef0aa2
--- /dev/null
+++ b/test/ram-test.c
@@ -0,0 +1,6 @@
+#include <stdio.h>
+int ram_contents[1024];
+int main(int argc, char * argv[]) {
+ printf("%s\n", ram_contents);
+ return 0;
+}
diff --git a/test/tape-test.bvr b/test/tape-test.bvr
index c965bc1..f91ceca 100644
--- a/test/tape-test.bvr
+++ b/test/tape-test.bvr
@@ -1,7 +1,18 @@
-<@?s post_author anton@>
+<@?s abc 1232@>
+<@?g abc@>
+<@?g abc@>
+<@?s abc 123@>
+<@?g abc@>
+<@?g abc@>
+<@?s ab 12@>
+<@?g ab@>
+<@?g ab@>
# to je komentar in se ne rendera
-<@?i h1@>
-<@?s image_caption This is an example image.@>
-<@?s example.jpg@>
-<@?i image@>
+<@?1 post_author@>
+<@?2 image_caption This is an example image.@>
+<@?3 sexample.jpg@>
+<@#?4 image@>
+<@?5 image@>
+<@?6 image@>
+<@?7 image@>
in tako so srečno živeli do konca svojih dni!
diff --git a/test/tape-test.c b/test/tape-test.c
index f1cca25..fc1b2e5 100644
--- a/test/tape-test.c
+++ b/test/tape-test.c
@@ -6,5 +6,10 @@ extern int main(int argc, char* argv[]) {
printf("usage: %s source-file file-with-commands-replaced-with-a's\n", argv[0]);
return 1;
}
- return bvr_compose_page(argv[1], 0, argv[2]);
+ // bvr_var_set("abc", "1234");
+ // bvr_var_set("ab", "123");
+ // printf("%s\n", bvr_var_get("abc"));
+ // printf("%s\n", bvr_var_get("ab"));
+ bvr_compose_page(argv[1], 0, argv[2]);
+ return 1;
}
diff --git a/test/var-test.c b/test/var-test.c
new file mode 100644
index 0000000..8c40d85
--- /dev/null
+++ b/test/var-test.c
@@ -0,0 +1,9 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <bvrvar.c>
+
+int main(int argc, char * argv[]) {
+ bvr_var_set("abc", "1232");
+ printf("%s\n", bvr_var_get("abc"));
+ return 0;
+}