Commit graph

46 commits

Author SHA1 Message Date
9c0a62143a
feat: symlink support 2024-03-15 16:31:54 +01:00
c85a9fa00b
feat: render txt files correctly 2024-03-15 12:07:30 +01:00
f4c1d12c59
use md4c as markdown library 2024-03-15 11:27:14 +01:00
7756515f96
rename module to awesomeindex 2024-03-14 13:37:42 +01:00
0b0fe824c0
feat: parse markdown 2024-03-14 10:58:02 +01:00
97df2dcc44
feat: readme file 2024-03-14 03:11:59 +01:00
f31b92df37
feat: use caddy template 2024-03-13 13:07:39 +01:00
Ryan Schmidt
e5f227686a Add tests for case-(in)sensitive sorting 2023-01-20 15:26:16 +02:00
Adrian Perez de Castro
674e99547d Add missing entry in long weekday names array
The entry for Saturday was missing, as pointed out in the bug report.
While at it, add a test case.

Fixes #157
2023-01-20 15:20:40 +02:00
Adrian Perez de Castro
1494521744 build-and-run: disable HTTP rewrite module
The HTTP rewrite module needs PCRE, which is not available in the GHA
MacOS runners. It is unused by the tests, so it's safe to disable
building it.
2023-01-20 13:59:17 +02:00
Adrian Perez de Castro
823f162085
Use the BSD license consistently
The t/preamble file incorrectly mentioned the MIT license before.
While at it, use SPDX license identification headers.

Closes #149
2022-05-26 00:40:58 +03:00
Ryan Schmidt
98f824ef91 get-pup: Use a fork of pup on recent macOS
Use a fork of pup on macOS 10.13 and higher because the binary provided
by the original project crashes immediately on those OS versions.

See https://github.com/ericchiang/pup/issues/85
2022-05-25 23:58:46 +03:00
Ryan Schmidt
8efe0b01fa Tests: Make test 02 more specific
Test for an opening table tag instead of just the word "table".
2022-05-25 23:53:42 +03:00
Ryan Schmidt
e505eb2a13 Tests: Wait for nginx to create pid file
When nginx is started, it returns control before it has created its pid
file. Since this test suite relies on the existence of the pid file,
wait until the pid file exists before returning from nginx_start. Time
out after 2 seconds so that if there is a real problem starting nginx
we don't wait forever.

Fixes #144
2022-05-25 23:52:58 +03:00
Ryan Schmidt
83bef5c8a6 Fix 404 not found when indexing filesystem root
Backport of 4c89c09ad8

Fixes #107
2022-05-25 23:51:27 +03:00
Ryan Schmidt
b9ecd5bcb4 Tests: Fix typos in descriptions and messages 2022-05-10 22:04:11 +03:00
Ryan Schmidt
698e7ce4b9 get-pup: Verify with openssl instead of sha256sum
Use openssl to verify download because sha256sum does not exist on
macOS.
2022-05-10 21:58:05 +03:00
Ryan Schmidt
a1890354e5 Tests: Build nginx in parallel on macOS 2022-05-10 19:55:34 +03:00
Ryan Schmidt
20ba8038ac Tests: Use netstat to list occupied ports on macOS
Use netstat instead of ss to list the occupied ports on macOS since
macOS doesn't have ss.

Closes #139
2022-05-10 19:46:26 +03:00
Adrian Perez de Castro
b0e1fa83a8 CI: Move over to GitHub Actions 2021-10-26 01:12:26 +03:00
Adrian Perez de Castro
c33b05af9e Fix check for arguments to fancyindex_{header,footer}
Closes #117
2020-10-26 22:41:38 +02:00
Adrian Perez de Castro
618e2d154e
Add missing "use pup" command to t/07-directory-first.test 2020-10-24 18:53:53 +03:00
Adrian Perez de Castro
f52bacea8f Add unit tests for local headers and footers 2020-10-24 18:52:58 +03:00
z4yx
63d19686df add a test of ngx_http_fancyindex_cmp_entries_dirs_first 2020-10-24 13:17:10 +03:00
Joshua Shaffer
42e21c9153 Added test for show_dotfiles 2020-05-26 16:14:09 +03:00
Joshua Shaffer
7444208a36 t/* should be eol=lf so bash can run 2020-05-26 16:14:09 +03:00
kPherox
fa13aef31b Add test for fancyindex_hide_parent_dir on 2018-10-15 11:28:09 +02:00
Adrian Perez de Castro
473c1de024 Properly encode filenames as URI components
Fixes #95
2018-08-30 00:12:47 +03:00
Adrian Perez de Castro
a983c2c899
Add test case for sort order by file-size after
This tests the fix from PR #88 and by having it in the test suite
it will make sure that sorting by size dos not get broken again.
2018-07-03 02:41:13 +03:00
Adrian Perez de Castro
6f812eba8e Add a test case which uses pup to check a listing 2018-07-03 02:16:45 +03:00
Adrian Perez de Castro
604b43b336 Add pup() and use() function to allow skipping when pup is unavailable
The "use pup" construct will skip a test case that needs pup installed.
The pup() function ensures that the downloaded binary is used.
2018-07-03 02:16:45 +03:00
Adrian Perez de Castro
60f09e450d Allow skipping test cases
This defines a skip() function in the tests preamble which can
be used to skip tests. Skipped tests are counted, and a reason
for them being skipped printed after running the tests.
2018-07-03 02:16:45 +03:00
Adrian Perez de Castro
501f9bc63c CI: Add script to fetch and validate a binary build of pup
The script downloads and validates the download against a built-in
list of known checksums for the release ZIP files.

More on pup: https://github.com/ericchiang/pup/
2018-07-03 02:16:45 +03:00
Adrian Perez de Castro
b1182f7758
Add test case 2016-12-08 15:33:13 +02:00
Adrian Perez de Castro
ee17ca1a65
Use in tests the generic method to pass config options
Instead of having variables being flipped around, just specify which Nginx
directives are needed in the configuration file.
2016-12-07 20:20:34 +02:00
Anders Trier Olesen
6442f26527 Add test for fancyindex_exact_size off 2016-11-04 01:31:05 +02:00
Fernando Costa
f2f0cdc9de Randomize test execution. 2016-10-18 23:51:08 +03:00
Adrian Perez de Castro
5e621202bd
Use only the new-style module configuration for dynamic builds
For static builds we still need to manually reorder $HTTP_MODULES, and we
cannot source "auto/module" like the new-style configuration mode needs,
because the "auto/module" snippet modifies $HTTP_MODULES itself, but ignores
the new $ngx_module_order variable when doing a static build.

Fortunately, the old-style way of configuring the module is still working in
all Nginx versions for statically built modules, so we can keep using that
for static builds.

This fixes issue #46.
2016-08-18 20:30:43 +03:00
Adrian Perez de Castro
07fb4ab214
t/run: Add some spacing and formatting to failed test outputs
This makes it easier to identify the outputs for each one of the failed
tests.
2016-08-18 19:19:11 +03:00
Adrian Perez de Castro
a1bb63c93b
Script which replicates the build-and-test done by Travis-CI
This allows developers to build nginx and run the test suite locally by
running just one single command.
2016-08-18 18:16:30 +03:00
Adrian Perez de Castro
f051caa108
Tests: Add test descriptions 2016-08-18 18:16:16 +03:00
Adrian Perez de Castro
038434dd9f
Ensure that a clean environment is used to launch Nginx in tests
This avoids potential issues when running the tests in environments which
might set variables which Nginx tries to read on startup. For example,
the $NGINX variable was being picked from the Travis-CI build matrix
configuration.
2016-08-18 16:48:28 +03:00
Adrian Perez de Castro
3789187861
Tests: Smoke-test that the module is returning data 2016-08-18 00:44:07 +03:00
Adrian Perez de Castro
8d47b33509
Tests: Check that dynamic module is not built when build is not dynamic 2016-08-18 00:44:07 +03:00
Adrian Perez de Castro
85ad712764
Tests: Move preamble out of t/run 2016-08-18 00:44:07 +03:00
Adrian Perez de Castro
866a9e18a0
Add a rudimentary test harness 2016-08-18 00:44:06 +03:00