diff options
author | Omar Rizwan <omar@omar.website> | 2020-12-25 13:40:18 -0800 |
---|---|---|
committer | Omar Rizwan <omar@omar.website> | 2020-12-25 13:40:18 -0800 |
commit | cc53bdd98dda8ec08f47f3d4c4c33ae6f6c5cf35 (patch) | |
tree | 6a6b3e859db798a398aa11fed7812af201aa1b32 /test.c | |
parent | b64c0f7016ae226659be00f03b617f483641603b (diff) |
make debugger/ subfolder. remove lastFocused storage (didn't need?)
make test reload on start. test seems to work
Diffstat (limited to 'test.c')
-rwxr-xr-x | test.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -5,6 +5,8 @@ #include <stdio.h> #include <stdlib.h> + +#include <unistd.h> #include <assert.h> #include <wordexp.h> @@ -15,13 +17,17 @@ int file_contents_equal(char* path, char* contents) { return system("[ \"$contents\" == \"$(cat \"$path\")\" ]") == 0; } -char* expand(char* phrase) { +char* expand(char* phrase) { // expand path with wildcard wordexp_t result; assert(wordexp(phrase, &result, 0) == 0); return result.we_wordv[0]; } // integration tests int main() { + // reload the extension so we know it's the latest code. + system("echo reload > fs/mnt/runtime/reload"); // this may error, but it should still have effect + sleep(2); + assert(system("echo about:blank > fs/mnt/tabs/create") == 0); assert(file_contents_equal("fs/mnt/tabs/last-focused/url.txt", "about:blank")); assert(system("file fs/mnt/tabs/last-focused/screenshot.png") == 0); // slow |