packages feed

opt-env-conf-test 0.0.0.4 → 0.0.0.5

raw patch · 25 files changed

+308/−47 lines, 25 filesdep ~opt-env-confsetup-changed

Dependency ranges changed: opt-env-conf

Files

CHANGELOG.md view
@@ -1,5 +1,15 @@ # Changelog +## [0.0.0.5] - 2026-09-27++### Changed++* The completer tests now expect the sorted completion output that+  `opt-env-conf >=0.15.0.3` produces, and the test suite requires that version.+  These test changes were made together with the `opt-env-conf` fix but never+  released, so the released tests still expected the order the filesystem+  happened to report and failed on machines that list directories differently.+ ## [0.0.0.4] - 2026-02-25  ### Changed
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
opt-env-conf-test.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           opt-env-conf-test-version:        0.0.0.4+version:        0.0.0.5 synopsis:       A testing companion package for opt-env-conf homepage:       https://github.com/NorfairKing/opt-env-conf#readme bug-reports:    https://github.com/NorfairKing/opt-env-conf/issues@@ -406,7 +406,7 @@     , genvalidity-sydtest     , genvalidity-text     , mtl-    , opt-env-conf+    , opt-env-conf >=0.15.0.3     , opt-env-conf-test     , path     , path-io
test/OptEnvConf/CompleterSpec.hs view
@@ -53,15 +53,15 @@                   withCurrentDir tdir $                     unCompleter filePath s `shouldReturn` l -        c "" [fileR "foo.txt", fileR "config.yaml", dirR "bar/"]+        c "" [fileR "config.yaml", fileR "foo.txt", dirR "bar/"]         c "f" [fileR "foo.txt"]         c "b" [dirR "bar/"]         c "bar" [fileR "bar/quux.txt", dirR "bar/", dirR "bar/deep/"]         c "c" [fileR "config.yaml"]         c "q" []         c "." [fileR ".hidden.txt", dirR ".hidden/"]-        c "./" [fileR "./foo.txt", fileR "./config.yaml", dirR "./bar/"]-        c "././" [fileR "././foo.txt", fileR "././config.yaml", dirR "././bar/"]+        c "./" [fileR "./config.yaml", fileR "./foo.txt", dirR "./bar/"]+        c "././" [fileR "././config.yaml", fileR "././foo.txt", dirR "././bar/"]         c "./." [fileR "./.hidden.txt", dirR "./.hidden/"]         c "./bar" [fileR "./bar/quux.txt", dirR "./bar/", dirR "./bar/deep/"] @@ -83,8 +83,8 @@           withCurrentDir subdir $ do             results <- unCompleter filePath ".."             results-              `shouldBe` [ fileR "../foo.txt",-                           fileR "../config.yaml",+              `shouldBe` [ fileR "../config.yaml",+                           fileR "../foo.txt",                            dirR "../bar/"                          ]         itWithOuter "can complete \"../\" to parent directory contents" $ \tdir -> do@@ -92,8 +92,8 @@           withCurrentDir subdir $ do             results <- unCompleter filePath "../"             results-              `shouldBe` [ fileR "../foo.txt",-                           fileR "../config.yaml",+              `shouldBe` [ fileR "../config.yaml",+                           fileR "../foo.txt",                            dirR "../bar/"                          ]         itWithOuter "can complete \"../f\" to matching parent files" $ \tdir -> do@@ -116,8 +116,8 @@           withCurrentDir tdir $ do             results <- unCompleter filePath "bar/../"             results-              `shouldBe` [ fileR "bar/../foo.txt",-                           fileR "bar/../config.yaml",+              `shouldBe` [ fileR "bar/../config.yaml",+                           fileR "bar/../foo.txt",                            dirR "bar/../bar/"                          ]         itWithOuter "can complete \"bar/../f\" to matching files" $ \tdir ->@@ -140,8 +140,8 @@             let absPrefix = fromAbsDir tdir             results <- unCompleter filePath absPrefix             results-              `shouldBe` [ fileR (absPrefix <> "foo.txt"),-                           fileR (absPrefix <> "config.yaml"),+              `shouldBe` [ fileR (absPrefix <> "config.yaml"),+                           fileR (absPrefix <> "foo.txt"),                            dirR (absPrefix <> "bar/")                          ] @@ -219,7 +219,7 @@                 withCurrentDir tdir $                   unCompleter (filePathWithExtensions [".txt", ".yaml"]) s `shouldReturn` l -        c "" [fileR "foo.txt", fileR "config.yaml", dirR "bar/"]+        c "" [fileR "config.yaml", fileR "foo.txt", dirR "bar/"]         c "bar/" [fileR "bar/quux.txt", dirR "bar/deep/"]  fileR :: String -> CompletionResult
test_resources/docs/big-config/docs.txt view
@@ -45,7 +45,14 @@                                                  })))                                       Nothing :|                                       [ ObjectKeySchema-                                          "sub" (Optional Nothing) StringSchema Nothing+                                          "sub"+                                          (Optional Nothing)+                                          (StringSchema+                                             StringBounds+                                               { stringBoundsMinLength = Nothing+                                               , stringBoundsMaxLength = Nothing+                                               })+                                          Nothing                                       ])))                          ])                   ) :|
test_resources/docs/big-config/env-docs.txt view
@@ -21,7 +21,15 @@                                            , boundsUpper = Just 9223372036854775807                                            })))                                 Nothing :|-                                [ ObjectKeySchema "sub" (Optional Nothing) StringSchema Nothing+                                [ ObjectKeySchema+                                    "sub"+                                    (Optional Nothing)+                                    (StringSchema+                                       StringBounds+                                         { stringBoundsMinLength = Nothing+                                         , stringBoundsMaxLength = Nothing+                                         })+                                    Nothing                                 ])))                    ])             ) :|
test_resources/docs/big-config/show.txt view
@@ -74,7 +74,17 @@                                            , boundsUpper = Just 9223372036854775807                                            }))))))                        (BimapCodec-                          _ _ (OptionalKeyCodec "sub" Nothing (StringCodec Nothing)))))) :|+                          _+                          _+                          (OptionalKeyCodec+                             "sub"+                             Nothing+                             (StringCodec+                                Nothing+                                StringBounds+                                  { stringBoundsMinLength = Nothing+                                  , stringBoundsMaxLength = Nothing+                                  })))))) :|               []))         Nothing         []
test_resources/docs/greet/docs.txt view
@@ -28,7 +28,14 @@            , setDocConfKeys =                Just                  (( "greeting" :| []-                  , AnyOfSchema (NullSchema :| [ StringSchema ])+                  , AnyOfSchema+                      (NullSchema :|+                         [ StringSchema+                             StringBounds+                               { stringBoundsMinLength = Nothing+                               , stringBoundsMaxLength = Nothing+                               }+                         ])                   ) :|                     [])            , setDocDefault = Just "\"Hello\""
test_resources/docs/greet/env-docs.txt view
@@ -4,7 +4,14 @@       ConfDoc         { confDocKeys =             ( "greeting" :| []-            , AnyOfSchema (NullSchema :| [ StringSchema ])+            , AnyOfSchema+                (NullSchema :|+                   [ StringSchema+                       StringBounds+                         { stringBoundsMinLength = Nothing+                         , stringBoundsMaxLength = Nothing+                         }+                   ])             ) :|               []         , confDocDefault = Just "\"Hello\""
test_resources/docs/greet/show.txt view
@@ -65,7 +65,15 @@                        (EitherCodec                           PossiblyJointUnion                           NullCodec-                          (BimapCodec _ _ (StringCodec Nothing))) :|+                          (BimapCodec+                             _+                             _+                             (StringCodec+                                Nothing+                                StringBounds+                                  { stringBoundsMinLength = Nothing+                                  , stringBoundsMaxLength = Nothing+                                  }))) :|                        []))                  (Just _)                  [ "Greetings" ]
test_resources/docs/same-help/docs.txt view
@@ -38,7 +38,14 @@                , setDocConfKeys =                    Just                      (( "string" :| []-                      , AnyOfSchema (NullSchema :| [ StringSchema ])+                      , AnyOfSchema+                          (NullSchema :|+                             [ StringSchema+                                 StringBounds+                                   { stringBoundsMinLength = Nothing+                                   , stringBoundsMaxLength = Nothing+                                   }+                             ])                       ) :|                         [])                , setDocDefault = Nothing
test_resources/docs/same-help/env-docs.txt view
@@ -22,7 +22,14 @@           ConfDoc             { confDocKeys =                 ( "string" :| []-                , AnyOfSchema (NullSchema :| [ StringSchema ])+                , AnyOfSchema+                    (NullSchema :|+                       [ StringSchema+                           StringBounds+                             { stringBoundsMinLength = Nothing+                             , stringBoundsMaxLength = Nothing+                             }+                       ])                 ) :|                   []             , confDocDefault = Nothing
test_resources/docs/same-help/show.txt view
@@ -75,7 +75,15 @@                        (EitherCodec                           PossiblyJointUnion                           NullCodec-                          (BimapCodec _ _ (StringCodec Nothing))) :|+                          (BimapCodec+                             _+                             _+                             (StringCodec+                                Nothing+                                StringBounds+                                  { stringBoundsMinLength = Nothing+                                  , stringBoundsMaxLength = Nothing+                                  }))) :|                        []))                  Nothing                  []
test_resources/docs/secret/docs.txt view
@@ -11,7 +11,14 @@            , setDocConfKeys =                Just                  (( "first-secret-file" :| []-                  , AnyOfSchema (NullSchema :| [ StringSchema ])+                  , AnyOfSchema+                      (NullSchema :|+                         [ StringSchema+                             StringBounds+                               { stringBoundsMinLength = Nothing+                               , stringBoundsMaxLength = Nothing+                               }+                         ])                   ) :|                     [])            , setDocDefault = Nothing@@ -87,7 +94,14 @@                , setDocConfKeys =                    Just                      (( "second-secret" :| []-                      , AnyOfSchema (NullSchema :| [ StringSchema ])+                      , AnyOfSchema+                          (NullSchema :|+                             [ StringSchema+                                 StringBounds+                                   { stringBoundsMinLength = Nothing+                                   , stringBoundsMaxLength = Nothing+                                   }+                             ])                       ) :|                         [])                , setDocDefault = Nothing@@ -106,7 +120,14 @@                , setDocConfKeys =                    Just                      (( "second-secret-file" :| []-                      , AnyOfSchema (NullSchema :| [ StringSchema ])+                      , AnyOfSchema+                          (NullSchema :|+                             [ StringSchema+                                 StringBounds+                                   { stringBoundsMinLength = Nothing+                                   , stringBoundsMaxLength = Nothing+                                   }+                             ])                       ) :|                         [])                , setDocDefault = Nothing@@ -191,7 +212,14 @@                , setDocConfKeys =                    Just                      (( "second-secret" :| []-                      , AnyOfSchema (NullSchema :| [ StringSchema ])+                      , AnyOfSchema+                          (NullSchema :|+                             [ StringSchema+                                 StringBounds+                                   { stringBoundsMinLength = Nothing+                                   , stringBoundsMaxLength = Nothing+                                   }+                             ])                       ) :|                         [])                , setDocDefault = Nothing@@ -211,7 +239,14 @@                , setDocConfKeys =                    Just                      (( "second-secret-file" :| []-                      , AnyOfSchema (NullSchema :| [ StringSchema ])+                      , AnyOfSchema+                          (NullSchema :|+                             [ StringSchema+                                 StringBounds+                                   { stringBoundsMinLength = Nothing+                                   , stringBoundsMaxLength = Nothing+                                   }+                             ])                       ) :|                         [])                , setDocDefault = Nothing
test_resources/docs/secret/env-docs.txt view
@@ -3,7 +3,14 @@       ConfDoc         { confDocKeys =             ( "first-secret-file" :| []-            , AnyOfSchema (NullSchema :| [ StringSchema ])+            , AnyOfSchema+                (NullSchema :|+                   [ StringSchema+                       StringBounds+                         { stringBoundsMinLength = Nothing+                         , stringBoundsMaxLength = Nothing+                         }+                   ])             ) :|               []         , confDocDefault = Nothing@@ -15,7 +22,14 @@           ConfDoc             { confDocKeys =                 ( "second-secret" :| []-                , AnyOfSchema (NullSchema :| [ StringSchema ])+                , AnyOfSchema+                    (NullSchema :|+                       [ StringSchema+                           StringBounds+                             { stringBoundsMinLength = Nothing+                             , stringBoundsMaxLength = Nothing+                             }+                       ])                 ) :|                   []             , confDocDefault = Nothing@@ -26,7 +40,14 @@           ConfDoc             { confDocKeys =                 ( "second-secret-file" :| []-                , AnyOfSchema (NullSchema :| [ StringSchema ])+                , AnyOfSchema+                    (NullSchema :|+                       [ StringSchema+                           StringBounds+                             { stringBoundsMinLength = Nothing+                             , stringBoundsMaxLength = Nothing+                             }+                       ])                 ) :|                   []             , confDocDefault = Nothing@@ -41,7 +62,14 @@           ConfDoc             { confDocKeys =                 ( "second-secret" :| []-                , AnyOfSchema (NullSchema :| [ StringSchema ])+                , AnyOfSchema+                    (NullSchema :|+                       [ StringSchema+                           StringBounds+                             { stringBoundsMinLength = Nothing+                             , stringBoundsMaxLength = Nothing+                             }+                       ])                 ) :|                   []             , confDocDefault = Nothing@@ -53,7 +81,14 @@           ConfDoc             { confDocKeys =                 ( "second-secret-file" :| []-                , AnyOfSchema (NullSchema :| [ StringSchema ])+                , AnyOfSchema+                    (NullSchema :|+                       [ StringSchema+                           StringBounds+                             { stringBoundsMinLength = Nothing+                             , stringBoundsMaxLength = Nothing+                             }+                       ])                 ) :|                   []             , confDocDefault = Nothing
test_resources/docs/secret/show.txt view
@@ -39,7 +39,15 @@                                 (EitherCodec                                    PossiblyJointUnion                                    NullCodec-                                   (BimapCodec _ _ (StringCodec Nothing))) :|+                                   (BimapCodec+                                      _+                                      _+                                      (StringCodec+                                         Nothing+                                         StringBounds+                                           { stringBoundsMinLength = Nothing+                                           , stringBoundsMaxLength = Nothing+                                           }))) :|                                 []))                           Nothing                           []@@ -184,7 +192,15 @@                                             (EitherCodec                                                PossiblyJointUnion                                                NullCodec-                                               (BimapCodec _ _ (StringCodec Nothing))) :|+                                               (BimapCodec+                                                  _+                                                  _+                                                  (StringCodec+                                                     Nothing+                                                     StringBounds+                                                       { stringBoundsMinLength = Nothing+                                                       , stringBoundsMaxLength = Nothing+                                                       }))) :|                                             []))                                       Nothing                                       []@@ -221,7 +237,15 @@                                                (EitherCodec                                                   PossiblyJointUnion                                                   NullCodec-                                                  (BimapCodec _ _ (StringCodec Nothing))) :|+                                                  (BimapCodec+                                                     _+                                                     _+                                                     (StringCodec+                                                        Nothing+                                                        StringBounds+                                                          { stringBoundsMinLength = Nothing+                                                          , stringBoundsMaxLength = Nothing+                                                          }))) :|                                                []))                                          Nothing                                          []@@ -364,7 +388,15 @@                        (EitherCodec                           PossiblyJointUnion                           NullCodec-                          (BimapCodec _ _ (StringCodec Nothing))) :|+                          (BimapCodec+                             _+                             _+                             (StringCodec+                                Nothing+                                StringBounds+                                  { stringBoundsMinLength = Nothing+                                  , stringBoundsMaxLength = Nothing+                                  }))) :|                        []))                  Nothing                  []@@ -401,7 +433,15 @@                           (EitherCodec                              PossiblyJointUnion                              NullCodec-                             (BimapCodec _ _ (StringCodec Nothing))) :|+                             (BimapCodec+                                _+                                _+                                (StringCodec+                                   Nothing+                                   StringBounds+                                     { stringBoundsMinLength = Nothing+                                     , stringBoundsMaxLength = Nothing+                                     }))) :|                           []))                     Nothing                     []
test_resources/docs/sub-commands/docs.txt view
@@ -32,7 +32,16 @@                      , setDocEnvVars = Just ("NAME" :| [])                      , setDocConfKeys =                          Just-                           (( "name" :| [] , AnyOfSchema (NullSchema :| [ StringSchema ]) ) :|+                           (( "name" :| []+                            , AnyOfSchema+                                (NullSchema :|+                                   [ StringSchema+                                       StringBounds+                                         { stringBoundsMinLength = Nothing+                                         , stringBoundsMaxLength = Nothing+                                         }+                                   ])+                            ) :|                               [])                      , setDocDefault = Nothing                      , setDocExamples = [ "john" ]
test_resources/docs/sub-commands/env-docs.txt view
@@ -9,7 +9,16 @@               AnyDocsSingle                 ConfDoc                   { confDocKeys =-                      ( "name" :| [] , AnyOfSchema (NullSchema :| [ StringSchema ]) ) :|+                      ( "name" :| []+                      , AnyOfSchema+                          (NullSchema :|+                             [ StringSchema+                                 StringBounds+                                   { stringBoundsMinLength = Nothing+                                   , stringBoundsMaxLength = Nothing+                                   }+                             ])+                      ) :|                         []                   , confDocDefault = Nothing                   , confDocExamples = [ "john" ]
test_resources/docs/sub-commands/show.txt view
@@ -67,7 +67,15 @@                         (EitherCodec                            PossiblyJointUnion                            NullCodec-                           (BimapCodec _ _ (StringCodec Nothing))) :|+                           (BimapCodec+                              _+                              _+                              (StringCodec+                                 Nothing+                                 StringBounds+                                   { stringBoundsMinLength = Nothing+                                   , stringBoundsMaxLength = Nothing+                                   }))) :|                         []))                   Nothing                   [ "john" ]
test_resources/docs/sub-settings/docs.txt view
@@ -27,7 +27,14 @@            , setDocConfKeys =                Just                  (( "foo" :| [ "bar" , "quux" ]-                  , AnyOfSchema (NullSchema :| [ StringSchema ])+                  , AnyOfSchema+                      (NullSchema :|+                         [ StringSchema+                             StringBounds+                               { stringBoundsMinLength = Nothing+                               , stringBoundsMaxLength = Nothing+                               }+                         ])                   ) :|                     [])            , setDocDefault = Nothing
test_resources/docs/sub-settings/env-docs.txt view
@@ -4,7 +4,14 @@       ConfDoc         { confDocKeys =             ( "foo" :| [ "bar" , "quux" ]-            , AnyOfSchema (NullSchema :| [ StringSchema ])+            , AnyOfSchema+                (NullSchema :|+                   [ StringSchema+                       StringBounds+                         { stringBoundsMinLength = Nothing+                         , stringBoundsMaxLength = Nothing+                         }+                   ])             ) :|               []         , confDocDefault = Nothing
test_resources/docs/sub-settings/show.txt view
@@ -58,7 +58,15 @@               (EitherCodec                  PossiblyJointUnion                  NullCodec-                 (BimapCodec _ _ (StringCodec Nothing))) :|+                 (BimapCodec+                    _+                    _+                    (StringCodec+                       Nothing+                       StringBounds+                         { stringBoundsMinLength = Nothing+                         , stringBoundsMaxLength = Nothing+                         }))) :|               []))         Nothing         []
test_resources/docs/sum-type/docs.txt view
@@ -54,7 +54,14 @@                , setDocConfKeys =                    Just                      (( "sum-type" :| []-                      , AnyOfSchema (NullSchema :| [ StringSchema ])+                      , AnyOfSchema+                          (NullSchema :|+                             [ StringSchema+                                 StringBounds+                                   { stringBoundsMinLength = Nothing+                                   , stringBoundsMaxLength = Nothing+                                   }+                             ])                       ) :|                         [])                , setDocDefault = Nothing
test_resources/docs/sum-type/env-docs.txt view
@@ -3,7 +3,14 @@       ConfDoc         { confDocKeys =             ( "sum-type" :| []-            , AnyOfSchema (NullSchema :| [ StringSchema ])+            , AnyOfSchema+                (NullSchema :|+                   [ StringSchema+                       StringBounds+                         { stringBoundsMinLength = Nothing+                         , stringBoundsMaxLength = Nothing+                         }+                   ])             ) :|               []         , confDocDefault = Nothing
test_resources/docs/sum-type/show.txt view
@@ -80,7 +80,15 @@                           (EitherCodec                              PossiblyJointUnion                              NullCodec-                             (BimapCodec _ _ (StringCodec Nothing))) :|+                             (BimapCodec+                                _+                                _+                                (StringCodec+                                   Nothing+                                   StringBounds+                                     { stringBoundsMinLength = Nothing+                                     , stringBoundsMaxLength = Nothing+                                     }))) :|                           []))                     Nothing                     []