 
             co[2].ref[0].should.be.eql d
             co[2].ref[1].should.be.eql r
+
+
+describe "path_split", ->
+    ps = misc.path_split
+    it "returns {head:..., tail:...} where tail is everything after the final slash", ->
+        ps("/").should.be.eql {head: "", tail: ""}
+        ps("/HOME/USER").should.be.eql {head: "/HOME", tail: "USER"}
+        ps("foobar").should.be.eql {head: "", tail: "foobar"}
+        ps("/home/user/file.ext").should.be.eql {head: "/home/user", tail: "file.ext"}
+
+
+describe "meta_file", ->
+    mf = misc.meta_file
+    it "constructs a metafile to a given file", ->
+        mf("foo", "history").should.be.eql ".foo.sage-history"
+        mf("/", "batz").should.be.eql "..sage-batz"
+        mf("/home/user/file.ext", "chat").should.be.eql "/home/user/.file.ext.sage-chat"
+
 
 describe "trunc", ->
     t = misc.trunc

        callback.getCall(1).args[0].should.eql "xyz"

    describe "sinon's stubs", ->
        it "are working for withArgs", ->
            func = sinon.stub()
            func.withArgs(42).returns(1)

    it "fails for empty arrays", =>
        (-> misc.min(@a1)).should.throw /Cannot read property 'reduce' of undefined/
        (-> misc.max(@a1)).should.throw /Cannot read property 'reduce' of undefined/


describe "copy flavours:", =>
    @mk_object= ->
