]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Formatting
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 8 Dec 2022 19:16:08 +0000 (13:16 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 8 Dec 2022 19:16:08 +0000 (13:16 -0600)
src/modules/rlm_rest/rest.c
src/tests/keywords/unspecified [new file with mode: 0644]

index e9f32a60e9fe6684de740c599f80ced3e62bed04..9b922280cb6de8edfc91f69fdc44c9a58e047cad 100644 (file)
@@ -49,19 +49,19 @@ const http_body_type_t http_body_type_supported[REST_HTTP_BODY_NUM_ENTRIES] = {
        REST_HTTP_BODY_UNSUPPORTED,             // REST_HTTP_BODY_UNSUPPORTED
        REST_HTTP_BODY_UNSUPPORTED,     // REST_HTTP_BODY_UNAVAILABLE
        REST_HTTP_BODY_UNSUPPORTED,             // REST_HTTP_BODY_INVALID
-       REST_HTTP_BODY_NONE,                    // REST_HTTP_BODY_NONE
+       REST_HTTP_BODY_NONE,            // REST_HTTP_BODY_NONE
        REST_HTTP_BODY_CUSTOM_XLAT,             // REST_HTTP_BODY_CUSTOM_XLAT
        REST_HTTP_BODY_CUSTOM_LITERAL,  // REST_HTTP_BODY_CUSTOM_LITERAL
-       REST_HTTP_BODY_POST,                    // REST_HTTP_BODY_POST
+       REST_HTTP_BODY_POST,            // REST_HTTP_BODY_POST
 #ifdef HAVE_JSON
-       REST_HTTP_BODY_JSON,                    // REST_HTTP_BODY_JSON
+       REST_HTTP_BODY_JSON,            // REST_HTTP_BODY_JSON
 #else
        REST_HTTP_BODY_UNAVAILABLE,
 #endif
        REST_HTTP_BODY_UNSUPPORTED,             // REST_HTTP_BODY_XML
-       REST_HTTP_BODY_UNSUPPORTED,             // REST_HTTP_BODY_YAML
+       REST_HTTP_BODY_UNSUPPORTED,     // REST_HTTP_BODY_YAML
        REST_HTTP_BODY_INVALID,         // REST_HTTP_BODY_HTML
-       REST_HTTP_BODY_PLAIN                    // REST_HTTP_BODY_PLAIN
+       REST_HTTP_BODY_PLAIN            // REST_HTTP_BODY_PLAIN
 };
 
 /*
@@ -184,14 +184,14 @@ size_t http_auth_table_len = NUM_ELEMENTS(http_auth_table);
  * @see fr_table_str_by_value
  */
 fr_table_num_sorted_t const http_content_type_table[] = {
-       { L("application/json"),                        REST_HTTP_BODY_JSON             },
+       { L("application/json"),                                REST_HTTP_BODY_JSON             },
        { L("application/x-www-form-urlencoded"),       REST_HTTP_BODY_POST             },
        { L("application/x-yaml"),                      REST_HTTP_BODY_YAML             },
-       { L("application/yaml"),                        REST_HTTP_BODY_YAML             },
+       { L("application/yaml"),                                REST_HTTP_BODY_YAML             },
        { L("text/html"),                               REST_HTTP_BODY_HTML             },
        { L("text/plain"),                              REST_HTTP_BODY_PLAIN            },
        { L("text/x-yaml"),                             REST_HTTP_BODY_YAML             },
-       { L("text/xml"),                                REST_HTTP_BODY_XML              },
+       { L("text/xml"),                                        REST_HTTP_BODY_XML              },
        { L("text/yaml"),                               REST_HTTP_BODY_YAML             }
 };
 size_t http_content_type_table_len = NUM_ELEMENTS(http_content_type_table);
diff --git a/src/tests/keywords/unspecified b/src/tests/keywords/unspecified
new file mode 100644 (file)
index 0000000..0f6de11
--- /dev/null
@@ -0,0 +1,16 @@
+#
+#  PRE: if
+#
+
+&reply.Reply-Message = 'foo'
+&reply.User-Name = 'bar'
+
+if (&reply.[0] != 'foo') {
+       test_fail
+}
+
+if (&reply.[1] != 'bar') {
+       test_fail
+}
+
+success
\ No newline at end of file