git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[StGIT PATCH 2/2] dash doesn't do curly brace expansion, so avoid that

From
Karl Hasselström <kha@treskal.com>
Date
Apr 29, 2007, 21:09 UTC
Message-ID
<20070429210955.4004.31074.stgit@yoghurt>
In-Reply-To
<20070429210713.4004.60467.stgit@yoghurt>
From: Karl Hasselström <kha@treskal.com>

I have dash as /bin/sh, and it doesn't seem to expand stuff in curly braces, which breaks t1800. Work around this by not using curly brace expansion to generate test data.

Signed-off-by: Karl Hasselström <kha@treskal.com>
---
 t/t1800-import.sh      |    4 +---
 t/t1800-import/foo.txt |   27 +++++++++++++++++++++++++++
 2 files changed, 28 insertions(+), 3 deletions(-)
diff --git a/t/t1800-import.sh b/t/t1800-import.sh
index ed10fa8..8c8c9a0 100755
--- a/t/t1800-import.sh
+++ b/t/t1800-import.sh
@@ -6,9 +6,7 @@ test_description='Test the import command'
 test_expect_success \
     'Initialize the StGIT repository' \
     '
-    for x in {do,di,da}{be,bi,bo}{dam,dim,dum}; do
-      echo $x
-    done > foo.txt &&
+    cp ../t1800-import/foo.txt . &&
     git add foo.txt &&
     git commit -a -m "initial version" &&
     stg init
diff --git a/t/t1800-import/foo.txt b/t/t1800-import/foo.txt
new file mode 100644
index 0000000..ad01662
--- /dev/null
+++ b/t/t1800-import/foo.txt
@@ -0,0 +1,27 @@
+dobedam
+dobedim
+dobedum
+dobidam
+dobidim
+dobidum
+dobodam
+dobodim
+dobodum
+dibedam
+dibedim
+dibedum
+dibidam
+dibidim
+dibidum
+dibodam
+dibodim
+dibodum
+dabedam
+dabedim
+dabedum
+dabidam
+dabidim
+dabidum
+dabodam
+dabodim
+dabodum
Previous: Karl HasselströmNext: Catalin Marinas
Message 3 of 5 in “Make test suite work with dash as /bin/sh”
  1. 0/2 Make test suite work with dash as /bin/shKarl Hasselström, Apr 29, 2007
  2. 1/2 String comparison is done with "=", not "=="Karl Hasselström, Apr 29, 2007
  3. 2/2 dash doesn't do curly brace expansion, so avoid thatKarl Hasselström, Apr 29, 2007
  4. Catalin MarinasApr 29, 2007
  5. Karl HasselströmApr 30, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.