theca 1.0.0

a simple, fully featured, command line note taking tool
Documentation
{
  "title": "GOOD SECOND PROFILE TESTS",
  "desc": "testing correct input for a second profile.",
  "tests": [
    {
      "name": "new profile 'second'",
      "profile": "second",
      "cmds": [
        ["new-profile", "second"]
      ],
      "result_path": "second.json",
      "result": {
        "encrypted": false,
        "notes": []
      }
    },{
      "name": "second profile, add note",
      "profile": "second",
      "cmds": [
        ["new-profile", "second"],
        ["add", "this is the title"]
      ],
      "result_path": "second.json",
      "result": {
        "encrypted": false,
        "notes": [
          {
            "id": 1,
            "title": "this is the title",
            "status": "",
            "body": ""
          }
        ]
      }
    },{
      "name": "second profile, add full note (body from arg)",
      "profile": "second",
      "cmds": [
        ["new-profile", "second"],
        ["add", "this is the title", "-s", "-b", "test body"]
      ],
      "result_path": "second.json",
      "result": {
        "encrypted": false,
        "notes": [
          {
            "id": 1,
            "title": "this is the title",
            "status": "Started",
            "body": "test body"
          }
        ]
      }
    },{
      "name": "second profile, add full note (body from stdin)",
      "profile": "second",
      "cmds": [
        ["new-profile", "second"],
        ["add", "this is the title", "-s", "-"]
      ],
      "stdin": [
        null,
        "test body"
      ],
      "result_path": "second.json",
      "result": {
        "encrypted": false,
        "notes": [
          {
            "id": 1,
            "title": "this is the title",
            "status": "Started",
            "body": "test body"
          }
        ]
      }
    },{
      "name": "second profile, add statuses",
      "profile": "second",
      "cmds": [
        ["new-profile", "second"],
        ["add", "a"],
        ["add", "b", "-s"],
        ["add", "c", "-u"]
      ],
      "result_path": "second.json",
      "result": {
        "encrypted": false,
        "notes": [
          {
            "id": 1,
            "title": "a",
            "status": "",
            "body": ""
          },{
            "id": 2,
            "title": "b",
            "status": "Started",
            "body": ""
          },{
            "id": 3,
            "title": "c",
            "status": "Urgent",
            "body": ""
          }
        ]
      }
    },{
      "name": "second profile, edit title",
      "profile": "second",
      "cmds": [
        ["new-profile", "second"],
        ["add", "this is the title"],
        ["edit", "1", "new title"]
      ],
      "result_path": "second.json",
      "result": {
        "encrypted": false,
        "notes": [
          {
            "id": 1,
            "title": "new title",
            "status": "",
            "body": ""
          }
        ]
      }
    },{
      "name": "second profile, edit statuses",
      "profile": "second",
      "cmds": [
        ["new-profile", "second"],
        ["add", "finished", "-u"],
        ["add", "started"],
        ["add", "urgent"],
        ["edit", "1", "-n"],
        ["edit", "2", "-s"],
        ["edit", "3", "-u"]
      ],
      "result_path": "second.json",
      "result": {
        "encrypted": false,
        "notes": [
          {
            "id": 1,
            "title": "finished",
            "status": "",
            "body": ""
          },{
            "id": 2,
            "title": "started",
            "status": "Started",
            "body": ""
          },{
            "id": 3,
            "title": "urgent",
            "status": "Urgent",
            "body": ""
          }
        ]
      }
    },{
      "name": "second profile, edit body (from arg)",
      "profile": "second",
      "cmds": [
        ["new-profile", "second"],
        ["add", "this is the title"],
        ["edit", "1", "-b", "a body yo"]
      ],
      "result_path": "second.json",
      "result": {
        "encrypted": false,
        "notes": [
          {
            "id": 1,
            "title": "this is the title",
            "status": "",
            "body": "a body yo"
          }
        ]
      }
    },{
      "name": "second profile, edit body (from stdin)",
      "profile": "second",
      "cmds": [
        ["new-profile", "second"],
        ["add", "this is the title"],
        ["edit", "1", "-"]
      ],
      "stdin": [
        null,
        null,
        "a body yo"
      ],
      "result_path": "second.json",
      "result": {
        "encrypted": false,
        "notes": [
          {
            "id": 1,
            "title": "this is the title",
            "status": "",
            "body": "a body yo"
          }
        ]
      }
    },{
      "name": "second profile, edit everything (from args)",
      "profile": "second",
      "cmds": [
        ["new-profile", "second"],
        ["add", "this is the title"],
        ["edit", "1", "new title yo", "-b", "a body", "-s"]
      ],
      "result_path": "second.json",
      "result": {
        "encrypted": false,
        "notes": [
          {
            "id": 1,
            "title": "new title yo",
            "status": "Started",
            "body": "a body"
          }
        ]
      }
    },{
      "name": "second profile, edit nothing",
      "profile": "second",
      "cmds": [
        ["new-profile", "second"],
        ["add", "this is the title"],
        ["edit", "1"]
      ],
      "result_path": "second.json",
      "result": {
        "encrypted": false,
        "notes": [
          {
            "id": 1,
            "title": "this is the title",
            "status": "",
            "body": ""
          }
        ]
      }
    },{
      "name": "second profile, edit everything (from stdin)",
      "profile": "second",
      "cmds": [
        ["new-profile", "second"],
        ["add", "this is the title"],
        ["edit", "1", "new title yo", "-", "-s"]
      ],
      "stdin": [
        null,
        null,
        "a body yo"
      ],
      "result_path": "second.json",
      "result": {
        "encrypted": false,
        "notes": [
          {
            "id": 1,
            "title": "new title yo",
            "status": "Started",
            "body": "a body yo"
          }
        ]
      }
    },{
      "name": "second profile, delete note",
      "profile": "second",
      "cmds": [
        ["new-profile", "second"],
        ["add", "this is the title"],
        ["del", "1"]
      ],
      "result_path": "second.json",
      "result": {
        "encrypted": false,
        "notes": []
      }
    },{
      "name": "second profile, clear notes (yes from arg)",
      "profile": "second",
      "cmds": [
        ["new-profile", "second"],
        ["add", "this is the title"],
        ["add", "this is another title"],
        ["clear", "-y"]
      ],
      "result_path": "second.json",
      "result": {
        "encrypted": false,
        "notes": []
      }
    },{
      "name": "second profile, clear notes (yes from stdin)",
      "profile": "second",
      "cmds": [
        ["new-profile", "second"],
        ["add", "this is the title"],
        ["add", "this is another title"],
        ["clear"]
      ],
      "stdin": [
        null,
        null,
        null,
        "y"
      ],
      "result_path": "second.json",
      "result": {
        "encrypted": false,
        "notes": []
      }
    }
  ]
}