2021-11-24 06:37:55 -05:00
|
|
|
;; This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
;;
|
2022-11-02 12:11:50 -05:00
|
|
|
;; Copyright (c) KALEIDOS INC
|
2021-11-24 06:37:55 -05:00
|
|
|
|
2022-11-08 04:40:19 -05:00
|
|
|
(ns common-tests.pages-helpers-test
|
2021-11-24 06:37:55 -05:00
|
|
|
(:require
|
2024-01-05 07:49:57 -05:00
|
|
|
[app.common.files.helpers :as cfh]
|
2021-11-24 06:37:55 -05:00
|
|
|
[clojure.pprint :refer [pprint]]
|
2024-01-05 07:49:57 -05:00
|
|
|
[clojure.test :as t]))
|
2021-11-24 06:37:55 -05:00
|
|
|
|
2021-12-09 11:35:05 -05:00
|
|
|
(t/deftest parse-path-name
|
2023-11-15 10:35:52 -05:00
|
|
|
(t/is (= ["foo" "bar"] (cfh/parse-path-name "foo/bar")))
|
|
|
|
(t/is (= ["" "foo"] (cfh/parse-path-name "foo")))
|
|
|
|
(t/is (= ["" "foo"] (cfh/parse-path-name "/foo")))
|
|
|
|
(t/is (= ["" ""] (cfh/parse-path-name "")))
|
|
|
|
(t/is (= ["" ""] (cfh/parse-path-name nil))))
|
2023-03-10 09:43:26 -05:00
|
|
|
|