Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add tests for the new features of Tesh.
authorDavid Glesser <david.glesser@imag.fr>
Fri, 2 Sep 2016 08:12:52 +0000 (10:12 +0200)
committerDavid Glesser <david.glesser@imag.fr>
Fri, 2 Sep 2016 08:12:52 +0000 (10:12 +0200)
tools/tesh/CMakeLists.txt
tools/tesh/color.tesh [new file with mode: 0644]
tools/tesh/ignore-regexp.tesh [new file with mode: 0644]

index c9fb495..ed44f89 100644 (file)
@@ -3,7 +3,7 @@ configure_file("${CMAKE_HOME_DIRECTORY}/tools/tesh/tesh.py"
 
 
 foreach(x setenv set-output-ignore set-output-sort set-return set-timeout background basic bg-basic bg-set-signal
-          catch-return catch-signal catch-timeout catch-wrong-output cd IO-bigsize IO-broken-pipe IO-orders)
+          catch-return catch-signal catch-timeout catch-wrong-output cd color ignore-regexp IO-bigsize IO-broken-pipe IO-orders)
   set(tesh_files  ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/${x}.tesh)
   if(NOT enable_memcheck AND NOT WIN32)
     ADD_TESH(tesh-self-${x} --setenv bindir=${CMAKE_BINARY_DIR}/bin ${CMAKE_HOME_DIRECTORY}/tools/tesh/${x}.tesh)
diff --git a/tools/tesh/color.tesh b/tools/tesh/color.tesh
new file mode 100644 (file)
index 0000000..404083b
--- /dev/null
@@ -0,0 +1,17 @@
+
+
+! output display
+$ printf "I \033[0;31mlove\033[0m tesh\n"
+> I love tesh
+
+! output display
+$ echo -e "\e[1;4mBold and Underlined\e[0m"
+> Bold and Underlined
+
+! output display
+$ echo -e "Default \e[94mLight blue\e[0m"
+> Default Light blue
+
+! output display
+$ echo -e "\e[38;5;82mHello \e[38;5;198mWorld\e[0m"
+> Hello World
diff --git a/tools/tesh/ignore-regexp.tesh b/tools/tesh/ignore-regexp.tesh
new file mode 100644 (file)
index 0000000..2648149
--- /dev/null
@@ -0,0 +1,5 @@
+
+! ignore .*0x[0-9A-F]+\.
+$  printf 'word\nMemory address: 0x42AA42.\nanotherword\n'
+> word
+> anotherword