diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-10-29 03:40:09 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-10-29 03:40:09 +0900 |
| commit | 274686d10d3386a41f8fb6bc3363269a734afe0e (patch) | |
| tree | 59ce81d5617cf5e1f67b819dab49b83b71d8ff93 /internal/validate/sysconf_test.go | |
| parent | 65342d588ff061d2130e6379d86a26be90c908ae (diff) | |
internal/validate: relocate from app
These are free of the dispatcher from internal/app. This change relocates them into their own package.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/validate/sysconf_test.go')
| -rw-r--r-- | internal/validate/sysconf_test.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/internal/validate/sysconf_test.go b/internal/validate/sysconf_test.go new file mode 100644 index 00000000..95502d34 --- /dev/null +++ b/internal/validate/sysconf_test.go @@ -0,0 +1,21 @@ +package validate_test + +import ( + "testing" + + "hakurei.app/internal/validate" +) + +const ( + _POSIX_LOGIN_NAME_MAX = 9 +) + +func TestSysconf(t *testing.T) { + t.Parallel() + + t.Run("LOGIN_NAME_MAX", func(t *testing.T) { + if got := validate.Sysconf(validate.SC_LOGIN_NAME_MAX); got < _POSIX_LOGIN_NAME_MAX { + t.Errorf("sysconf(_SC_LOGIN_NAME_MAX): %d < _POSIX_LOGIN_NAME_MAX", got) + } + }) +} |
