From 1b593e1ea4d2af0f6444d9a7788d5d99abd6fde5 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sat, 11 Jan 2020 23:36:56 +0000 Subject: Squashed 'third_party/git/' content from commit cb71568594 git-subtree-dir: third_party/git git-subtree-split: cb715685942260375e1eb8153b0768a376e4ece7 --- t/t0063-string-list.sh | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100755 t/t0063-string-list.sh (limited to 't/t0063-string-list.sh') diff --git a/t/t0063-string-list.sh b/t/t0063-string-list.sh new file mode 100755 index 000000000000..c6ee9f66b11d --- /dev/null +++ b/t/t0063-string-list.sh @@ -0,0 +1,91 @@ +#!/bin/sh +# +# Copyright (c) 2012 Michael Haggerty +# + +test_description='Test string list functionality' + +. ./test-lib.sh + +test_split () { + cat >expected && + test_expect_success "split $1 at $2, max $3" " + test-tool string-list split '$1' '$2' '$3' >actual && + test_cmp expected actual && + test-tool string-list split_in_place '$1' '$2' '$3' >actual && + test_cmp expected actual + " +} + +test_split "foo:bar:baz" ":" "-1" <