Initial commit

This commit is contained in:
Gustavo Cordova Avila
2024-03-25 16:32:35 -07:00
commit b02bd3aaff
6 changed files with 81 additions and 0 deletions

1
tests/config.nims Normal file
View File

@@ -0,0 +1 @@
switch("path", "$projectDir/../src")

View File

@@ -0,0 +1,17 @@
# This is just an example to get you started. You may wish to put all of your
# tests into a single file, or separate them into multiple `test1`, `test2`
# etc. files (better names are recommended, just make sure the name starts with
# the letter 't').
#
# To run these tests, simply execute `nimble test`.
import unittest
import snake_case
test "toSnakeCase":
check "toSnakeCase".toSnakeCase() == "TO_SNAKE_CASE"
check "httpServerName".toSnakeCase() == "HTTP_SERVER_NAME"
check "portNum".toSnakeCase() == "PORT_NUM"
check "firstNameOnly".toSnakeCase() == "FIRST_NAME_ONLY"
check "rostr.token".toSnakeCase() == "ROSTR_TOKEN"

View File

@@ -0,0 +1,17 @@
# This is just an example to get you started. You may wish to put all of your
# tests into a single file, or separate them into multiple `test1`, `test2`
# etc. files (better names are recommended, just make sure the name starts with
# the letter 't').
#
# To run these tests, simply execute `nimble test`.
import unittest
import snake_case
test "fromSnakeCase":
check "TO_SNAKE_CASE".fromSnakeCase() == "toSnakeCase"
check "HTTP_SERVER_NAME".fromSnakeCase() == "httpServerName"
check "PORT_NUM".fromSnakeCase() == "portNum"
check "FIRST_NAME_ONLY".fromSnakeCase() == "firstNameOnly"
check "ROSTR_TOKEN".fromSnakeCase() == "rostrToken"