Mercurial
annotate mrjunejune/test/auto_generated_test.c @ 252:7a7581f040e8
[ui] Add scoped notification component
Co-authored-by: Copilot <[email protected]>
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Tue, 04 Aug 2026 11:57:16 -0700 |
| parents | b8aa08503378 |
| children | 1f9877b637e9 |
| rev | line source |
|---|---|
| 129 | 1 // Auto-generated test file |
| 2 // Source: /Users/mrjunejune/zenbu/mrjunejune/main.c | |
| 3 // DO NOT EDIT - Regenerate with: bazel run //seobeo:test_generator | |
| 4 | |
| 5 #include "mrjunejune/test/test.h" | |
| 6 | |
| 7 #define TEST_HOST "127.0.0.1" | |
| 8 #define TEST_PORT "6969" | |
| 9 | |
| 10 int main(int argc, char *argv[]) | |
| 11 { | |
| 12 printf("=== Auto-generated Snapshot Creator ===\n\n"); | |
| 13 | |
|
145
c1eab8c0b0f9
[MrJuneJune] Small improvement UX and tests passes now.
June Park <parkjune1995@gmail.com>
parents:
129
diff
changeset
|
14 const char *server_binary = "./mrjunejune_server"; |
| 129 | 15 if (argc > 1) server_binary = argv[1]; |
| 16 | |
| 17 pid_t server_pid = start_test_server(server_binary); | |
| 18 if (server_pid < 0) return 1; | |
| 19 | |
| 20 SnapshotConfig configs[] = { | |
| 21 {"/", 200, SNAPSHOT_DIR, TEST_HOST, TEST_PORT}, | |
| 22 {"/index.html", 301, SNAPSHOT_DIR, TEST_HOST, TEST_PORT}, | |
| 23 {"/resume", 200, SNAPSHOT_DIR, TEST_HOST, TEST_PORT}, | |
| 24 {"/resume/index.html", 301, SNAPSHOT_DIR, TEST_HOST, TEST_PORT}, | |
| 25 {"/tools", 200, SNAPSHOT_DIR, TEST_HOST, TEST_PORT}, | |
| 26 {"/tools/index.html", 301, SNAPSHOT_DIR, TEST_HOST, TEST_PORT}, | |
| 27 {"/tools/markdown_to_html", 200, SNAPSHOT_DIR, TEST_HOST, TEST_PORT}, | |
| 28 {"/tools/markdown_to_html/index.html", 301, SNAPSHOT_DIR, TEST_HOST, TEST_PORT}, | |
| 29 {"/tools/file_converter", 200, SNAPSHOT_DIR, TEST_HOST, TEST_PORT}, | |
| 30 {"/tools/file_converter/index.html", 301, SNAPSHOT_DIR, TEST_HOST, TEST_PORT}, | |
|
242
543df0fe7168
[tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents:
145
diff
changeset
|
31 {"/tools/hls_player", 200, SNAPSHOT_DIR, TEST_HOST, TEST_PORT}, |
|
543df0fe7168
[tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents:
145
diff
changeset
|
32 {"/tools/hls_player/index.html", 301, SNAPSHOT_DIR, TEST_HOST, TEST_PORT}, |
|
244
b8aa08503378
[tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents:
242
diff
changeset
|
33 {"/tools/latex_editor", 200, SNAPSHOT_DIR, TEST_HOST, TEST_PORT}, |
|
b8aa08503378
[tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents:
242
diff
changeset
|
34 {"/tools/latex_editor/index.html", 301, SNAPSHOT_DIR, TEST_HOST, TEST_PORT}, |
| 129 | 35 // TODO: POST route - POST /api/convert/image-to-webp - requires request body |
| 36 // TODO: POST route - POST /api/convert/video-to-mp4 - requires request body | |
| 37 // TODO: Dynamic route - GET /api/download/:filename - fill in actual path | |
| 38 {"/blog", 200, SNAPSHOT_DIR, TEST_HOST, TEST_PORT}, | |
| 39 // TODO: Dynamic route - GET /blog/:blog_id - fill in actual path | |
| 40 {"/talk", 200, SNAPSHOT_DIR, TEST_HOST, TEST_PORT}, | |
| 41 {"/talk/index.html", 301, SNAPSHOT_DIR, TEST_HOST, TEST_PORT}, | |
| 42 }; | |
| 43 | |
| 44 int count = sizeof(configs) / sizeof(configs[0]); | |
|
244
b8aa08503378
[tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents:
242
diff
changeset
|
45 int result = 0; |
|
b8aa08503378
[tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents:
242
diff
changeset
|
46 if (argc > 2) |
|
b8aa08503378
[tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents:
242
diff
changeset
|
47 { |
|
b8aa08503378
[tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents:
242
diff
changeset
|
48 int found = 0; |
|
b8aa08503378
[tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents:
242
diff
changeset
|
49 for (int i = 0; i < count; i++) |
|
b8aa08503378
[tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents:
242
diff
changeset
|
50 { |
|
b8aa08503378
[tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents:
242
diff
changeset
|
51 if (strcmp(configs[i].path, argv[2]) != 0) |
|
b8aa08503378
[tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents:
242
diff
changeset
|
52 continue; |
|
b8aa08503378
[tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents:
242
diff
changeset
|
53 result = Seobeo_Snapshot_Create(&configs[i]); |
|
b8aa08503378
[tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents:
242
diff
changeset
|
54 found = 1; |
|
b8aa08503378
[tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents:
242
diff
changeset
|
55 break; |
|
b8aa08503378
[tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents:
242
diff
changeset
|
56 } |
|
b8aa08503378
[tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents:
242
diff
changeset
|
57 if (!found) |
|
b8aa08503378
[tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents:
242
diff
changeset
|
58 { |
|
b8aa08503378
[tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents:
242
diff
changeset
|
59 fprintf(stderr, "No snapshot route configured for %s\n", argv[2]); |
|
b8aa08503378
[tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents:
242
diff
changeset
|
60 result = 1; |
|
b8aa08503378
[tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents:
242
diff
changeset
|
61 } |
|
b8aa08503378
[tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents:
242
diff
changeset
|
62 } |
|
b8aa08503378
[tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents:
242
diff
changeset
|
63 else |
|
b8aa08503378
[tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents:
242
diff
changeset
|
64 { |
|
b8aa08503378
[tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents:
242
diff
changeset
|
65 result = Seobeo_Snapshots_Create_Batch(configs, count); |
|
b8aa08503378
[tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents:
242
diff
changeset
|
66 } |
| 129 | 67 |
| 68 stop_test_server(server_pid); | |
| 69 return result; | |
| 70 } |