lib/popcorn: move examples tests to nice and tidy tests/ directories.
authorAlexandre Terrasa <alexandre@moz-code.org>
Thu, 11 May 2017 23:07:37 +0000 (19:07 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Wed, 17 May 2017 13:38:29 +0000 (09:38 -0400)
So the user/reader directly see the important files.

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

33 files changed:
lib/popcorn/Makefile
lib/popcorn/examples/angular/tests/test_example_angular.nit [moved from lib/popcorn/examples/angular/test_example_angular.nit with 91% similarity]
lib/popcorn/examples/angular/tests/test_example_angular.res [moved from lib/popcorn/examples/angular/test_example_angular.sav/test_example_angular.res with 99% similarity]
lib/popcorn/examples/handlers/tests/test_example_post_handler.nit [moved from lib/popcorn/examples/handlers/test_example_post_handler.nit with 97% similarity]
lib/popcorn/examples/handlers/tests/test_example_post_handler.res [moved from lib/popcorn/examples/handlers/test_example_post_handler.sav/test_example_post_handler.res with 93% similarity]
lib/popcorn/examples/handlers/tests/test_example_query_string.nit [moved from lib/popcorn/examples/handlers/test_example_query_string.nit with 97% similarity]
lib/popcorn/examples/handlers/tests/test_example_query_string.res [moved from lib/popcorn/examples/handlers/test_example_query_string.sav/test_example_query_string.res with 99% similarity]
lib/popcorn/examples/hello_world/tests/test_example_hello.nit [moved from lib/popcorn/examples/hello_world/test_example_hello.nit with 100% similarity]
lib/popcorn/examples/hello_world/tests/test_example_hello.res [moved from lib/popcorn/examples/hello_world/test_example_hello.sav/test_example_hello.res with 100% similarity]
lib/popcorn/examples/middlewares/tests/test_example_advanced_logger.nit [moved from lib/popcorn/examples/middlewares/test_example_advanced_logger.nit with 96% similarity]
lib/popcorn/examples/middlewares/tests/test_example_advanced_logger.res [moved from lib/popcorn/examples/middlewares/test_example_advanced_logger.sav/test_example_advanced_logger.res with 96% similarity]
lib/popcorn/examples/middlewares/tests/test_example_html_error_handler.nit [moved from lib/popcorn/examples/middlewares/test_example_html_error_handler.nit with 96% similarity]
lib/popcorn/examples/middlewares/tests/test_example_html_error_handler.res [moved from lib/popcorn/examples/middlewares/test_example_html_error_handler.sav/test_example_html_error_handler.res with 97% similarity]
lib/popcorn/examples/middlewares/tests/test_example_simple_error_handler.nit [moved from lib/popcorn/examples/middlewares/test_example_simple_error_handler.nit with 96% similarity]
lib/popcorn/examples/middlewares/tests/test_example_simple_error_handler.res [moved from lib/popcorn/examples/middlewares/test_example_simple_error_handler.sav/test_example_simple_error_handler.res with 82% similarity]
lib/popcorn/examples/middlewares/tests/test_example_simple_logger.nit [moved from lib/popcorn/examples/middlewares/test_example_simple_logger.nit with 96% similarity]
lib/popcorn/examples/middlewares/tests/test_example_simple_logger.res [moved from lib/popcorn/examples/middlewares/test_example_simple_logger.sav/test_example_simple_logger.res with 96% similarity]
lib/popcorn/examples/routing/tests/test_example_glob_route.nit [moved from lib/popcorn/examples/routing/test_example_glob_route.nit with 100% similarity]
lib/popcorn/examples/routing/tests/test_example_glob_route.res [moved from lib/popcorn/examples/routing/test_example_glob_route.sav/test_example_glob_route.res with 100% similarity]
lib/popcorn/examples/routing/tests/test_example_param_route.nit [moved from lib/popcorn/examples/routing/test_example_param_route.nit with 100% similarity]
lib/popcorn/examples/routing/tests/test_example_param_route.res [moved from lib/popcorn/examples/routing/test_example_param_route.sav/test_example_param_route.res with 100% similarity]
lib/popcorn/examples/routing/tests/test_example_router.nit [moved from lib/popcorn/examples/routing/test_example_router.nit with 100% similarity]
lib/popcorn/examples/routing/tests/test_example_router.res [moved from lib/popcorn/examples/routing/test_example_router.sav/test_example_router.res with 100% similarity]
lib/popcorn/examples/sessions/tests/test_example_session.nit [moved from lib/popcorn/examples/sessions/test_example_session.nit with 97% similarity]
lib/popcorn/examples/sessions/tests/test_example_session.res [moved from lib/popcorn/examples/sessions/test_example_session.sav/test_example_session.res with 98% similarity]
lib/popcorn/examples/static_files/tests/test_example_static.nit [moved from lib/popcorn/examples/static_files/test_example_static.nit with 92% similarity]
lib/popcorn/examples/static_files/tests/test_example_static.res [moved from lib/popcorn/examples/static_files/test_example_static.sav/test_example_static.res with 99% similarity]
lib/popcorn/examples/static_files/tests/test_example_static_default.nit [moved from lib/popcorn/examples/static_files/test_example_static_default.nit with 91% similarity]
lib/popcorn/examples/static_files/tests/test_example_static_default.res [moved from lib/popcorn/examples/static_files/test_example_static_default.sav/test_example_static_default.res with 99% similarity]
lib/popcorn/examples/static_files/tests/test_example_static_multiple.nit [moved from lib/popcorn/examples/static_files/test_example_static_multiple.nit with 81% similarity]
lib/popcorn/examples/static_files/tests/test_example_static_multiple.res [moved from lib/popcorn/examples/static_files/test_example_static_multiple.sav/test_example_static_multiple.res with 99% similarity]
lib/popcorn/tests/test_popcorn.sav/test_router.res [moved from lib/popcorn/test_popcorn.sav/test_router.res with 100% similarity]
lib/popcorn/tests/test_popcorn.sav/test_routes.res [moved from lib/popcorn/test_popcorn.sav/test_routes.res with 100% similarity]

index c48c3dd..ed29191 100644 (file)
@@ -19,4 +19,4 @@ NITUNIT=nitunit
 all:
 
 check:
-       $(NITUNIT) . tests/
+       $(NITUNIT) . tests/ examples/
@@ -29,10 +29,10 @@ class TestExampleAngular
                system "curl -s {host}:{port}/not_found" # handled by angular controller
        end
 
-       fun test_example_param_route do
+       fun test_example_angular do
                var app = new App
                app.use("/counter", new CounterAPI)
-               app.use("/*", new StaticHandler("../examples/angular/www/", "index.html"))
+               app.use("/*", new StaticHandler("examples/angular/www/", "index.html"))
                run_test(app)
        end
 end
@@ -31,7 +31,7 @@ class TestExampleQueryString
                system "curl -s {host}:{port}/"
        end
 
-       fun test_example_glob_route do
+       fun test_example_post_handler do
                var app = new App
                app.use("/", new PostHandler)
                run_test(app)
@@ -4,7 +4,6 @@ URI: /
 Body: 
 
 [Client] curl -s localhost:*****/ --data 'user'
-POST Error: user format error on user
 URI: /
 Body: user
 
@@ -35,4 +34,4 @@ order: desc
                <body>
                <h1>404 Not Found</h1>
                </body>
-               </html>
\ No newline at end of file
+               </html>
@@ -30,7 +30,7 @@ class TestExampleQueryString
                system "curl -s {host}:{port}/?items=10\\&order=asc"
        end
 
-       fun test_example_glob_route do
+       fun test_example_query_string do
                var app = new App
                app.use("/", new QueryStringHandler)
                run_test(app)
@@ -27,7 +27,7 @@ class TestExampleAdvancedLogger
                system "curl -s {host}:{port}/about"
        end
 
-       fun test_example_param_route do
+       fun test_example_advanced_logger do
                var app = new App
                app.use_before("/*", new RequestTimeHandler)
                app.use("/", new HelloHandler)
@@ -13,4 +13,4 @@ GET /about \e[33m404\e[m (0.0s)
                <body>
                <h1>404 Not Found</h1>
                </body>
-               </html>
\ No newline at end of file
+               </html>
@@ -27,7 +27,7 @@ class TestExampleHtmlErrorHandler
                system "curl -s {host}:{port}/about"
        end
 
-       fun test_example_param_route do
+       fun test_example_html_error_handler do
                var app = new App
                app.use("/*", new HtmlErrorHandler)
                run_test(app)
@@ -27,7 +27,7 @@ class TestExampleSimpleErrorHandler
                system "curl -s {host}:{port}/about"
        end
 
-       fun test_example_param_route do
+       fun test_example_simple_error_handler do
                var app = new App
                app.use("/", new HelloHandler)
                app.use("/*", new SimpleErrorHandler)
@@ -27,7 +27,7 @@ class TestExampleSimpleLogger
                system "curl -s {host}:{port}/about"
        end
 
-       fun test_example_param_route do
+       fun test_example_simple_logger do
                var app = new App
                app.use_before("/*", new LogHandler)
                app.use("/", new HelloHandler)
@@ -13,4 +13,4 @@ Request Logged
                <body>
                <h1>404 Not Found</h1>
                </body>
-               </html>
\ No newline at end of file
+               </html>
@@ -30,7 +30,7 @@ class TestExampleSession
                system "curl -s {host}:{port}/products/not_found"
        end
 
-       fun test_example_param_route do
+       fun test_example_session do
                var app = new App
                app.use("/*", new SessionInit)
                app.use("/", new AppLogin)
@@ -38,4 +38,4 @@
                <body>
                <h1>404 Not Found</h1>
                </body>
-               </html>
\ No newline at end of file
+               </html>
@@ -32,9 +32,9 @@ class TestExampleStatic
                system "curl -s {host}:{port}/not_found.nit"
        end
 
-       fun test_example_param_route do
+       fun test_example_static do
                var app = new App
-               app.use("/", new StaticHandler("../examples/static_files/public/"))
+               app.use("/", new StaticHandler("examples/static_files/public/"))
                run_test(app)
        end
 end
@@ -70,4 +70,4 @@ alert("Hello World!");
                <body>
                <h1>404 Not Found</h1>
                </body>
-               </html>
\ No newline at end of file
+               </html>
@@ -32,9 +32,9 @@ class TestExampleStaticDefault
                system "curl -s {host}:{port}/not_found.nit"
        end
 
-       fun test_example_param_route do
+       fun test_example_static_default do
                var app = new App
-               app.use("/", new StaticHandler("../examples/static_files/public/", "default.html"))
+               app.use("/", new StaticHandler("examples/static_files/public/", "default.html"))
                run_test(app)
        end
 end
@@ -36,12 +36,12 @@ class TestExampleStaticMultiple
                system "curl -s {host}:{port}/not_found.nit"
        end
 
-       fun test_example_param_route do
+       fun test_example_static_multiple do
                var app = new App
-               app.use("/", new StaticHandler("../examples/static_files/public/"))
-               app.use("/", new StaticHandler("../examples/static_files/files/"))
-               app.use("/static", new StaticHandler("../examples/static_files/public/"))
-               app.use("/static", new StaticHandler("../examples/static_files/files/"))
+               app.use("/", new StaticHandler("examples/static_files/public/"))
+               app.use("/", new StaticHandler("examples/static_files/files/"))
+               app.use("/static", new StaticHandler("examples/static_files/public/"))
+               app.use("/static", new StaticHandler("examples/static_files/files/"))
                run_test(app)
        end
 end
@@ -103,4 +103,4 @@ alert("Hello World!");
                <body>
                <h1>404 Not Found</h1>
                </body>
-               </html>
\ No newline at end of file
+               </html>