Added test case for pathlen constrains in intermediate certificates
diff --git a/tests/suites/test_suite_x509parse.function b/tests/suites/test_suite_x509parse.function
index 637d13c..0acedfd 100644
--- a/tests/suites/test_suite_x509parse.function
+++ b/tests/suites/test_suite_x509parse.function
@@ -275,6 +275,33 @@
 END_CASE
 
 BEGIN_CASE
+x509_crt_verify_chain:chain_paths_str:trusted_ca:ret
+{
+    char *act;
+    int flags;
+    int res;
+    x509_cert trusted, chain;
+    char *chain_paths;
+
+    memset( &chain, 0, sizeof( x509_cert ) );
+    memset( &trusted, 0, sizeof( x509_cert ) );
+    chain_paths = strdup( {chain_paths_str} );
+    TEST_ASSERT( chain_paths != NULL );
+
+    while( ( act = strsep( &chain_paths, " " ) ) != NULL )
+        TEST_ASSERT( x509parse_crtfile( &chain, act ) == 0 );
+    TEST_ASSERT( x509parse_crtfile( &trusted, {trusted_ca} ) == 0 );
+
+    res = x509parse_verify( &chain, &trusted, NULL, NULL, &flags, NULL, NULL );
+
+    x509_free( &trusted );
+    x509_free( &chain );
+
+    TEST_ASSERT( ( {ret} ) == res );
+}
+END_CASE
+
+BEGIN_CASE
 x509_selftest:
 {
     TEST_ASSERT( x509_self_test( 0 ) == 0 );