Bladeren bron

Use 'id' term for jats:// test and suite ids

Alois Mahdal 6 jaren geleden
bovenliggende
commit
6eeca7c437
3 gewijzigde bestanden met toevoegingen van 8 en 8 verwijderingen
  1. 1
    1
      src/libexec/jattool-runtest
  2. 3
    3
      src/libexec/jattool-sfind
  3. 4
    4
      src/libexec/jattool-tfind

+ 1
- 1
src/libexec/jattool-runtest Bestand weergeven

75
             ;;
75
             ;;
76
         */*)
76
         */*)
77
             TestHome=$1
77
             TestHome=$1
78
-            TestId=$(jattool tfind -f jats "$TestHome") || {
78
+            TestId=$(jattool tfind -f id "$TestHome") || {
79
                 warn "could not find test id, using pathname: $TestHome"
79
                 warn "could not find test id, using pathname: $TestHome"
80
                 TestId="jats://_jats_no_suite_/$TestHome"
80
                 TestId="jats://_jats_no_suite_/$TestHome"
81
             }
81
             }

+ 3
- 3
src/libexec/jattool-sfind Bestand weergeven

10
         -- \
10
         -- \
11
             "Discover test in suite located at PATH"                         \
11
             "Discover test in suite located at PATH"                         \
12
         -o                                                                   \
12
         -o                                                                   \
13
-            "-f FMT     Print test name in format FMT. 'jats' or 'path'."    \
13
+            "-f FMT     Print test name in format FMT. 'id' or 'path'."    \
14
         --                                                                   \
14
         --                                                                   \
15
             "Test body should consist of asserts and/or phases documented"   \
15
             "Test body should consist of asserts and/or phases documented"   \
16
             "in jat.sh Shellfu module; use \`sfdoc jat\` to access its"    \
16
             "in jat.sh Shellfu module; use \`sfdoc jat\` to access its"    \
71
             SuiteNs=$(sprop ns)
71
             SuiteNs=$(sprop ns)
72
             SuiteSutPname=$(sprop sut_pname)
72
             SuiteSutPname=$(sprop sut_pname)
73
             case $Fmt in
73
             case $Fmt in
74
-                jats)
74
+                id)
75
                     echo -n "jats://$SuiteDomain/$SuiteNs"
75
                     echo -n "jats://$SuiteDomain/$SuiteNs"
76
                     test -n "$SuiteSutPname" && echo -n "/$SuiteSutPname"
76
                     test -n "$SuiteSutPname" && echo -n "/$SuiteSutPname"
77
                     echo //
77
                     echo //
94
     esac done
94
     esac done
95
     FindDirs=("$@")
95
     FindDirs=("$@")
96
     case $Fmt in
96
     case $Fmt in
97
-        jats|path) : ;;
97
+        id|path|version) : ;;
98
         *) usage -w "unknown FMT: $Fmt" ;;
98
         *) usage -w "unknown FMT: $Fmt" ;;
99
     esac
99
     esac
100
     debug -v FindDirs Fmt
100
     debug -v FindDirs Fmt

+ 4
- 4
src/libexec/jattool-tfind Bestand weergeven

10
         -- \
10
         -- \
11
             "Discover all JATS tests under directory PATH."                  \
11
             "Discover all JATS tests under directory PATH."                  \
12
         -o                                                                   \
12
         -o                                                                   \
13
-            "-f FMT     Print test name in format FMT. 'jats' or 'path'."
13
+            "-f FMT     Print test name in format FMT. 'id' or 'path'."
14
 }
14
 }
15
 
15
 
16
 discover() {
16
 discover() {
27
             s_dir=$(straverse "$t_cand") || continue
27
             s_dir=$(straverse "$t_cand") || continue
28
             t_apath=$(dirname "$(readlink -f "$t_cand")")
28
             t_apath=$(dirname "$(readlink -f "$t_cand")")
29
             t_rpath=${t_apath#$s_dir/}
29
             t_rpath=${t_apath#$s_dir/}
30
-            s_id=$(jattool sfind -f jats "$s_dir")
30
+            s_id=$(jattool sfind -f id "$s_dir")
31
             debug -v s_dir s_id t_apath t_rpath
31
             debug -v s_dir s_id t_apath t_rpath
32
             case $Fmt in
32
             case $Fmt in
33
                 path) echo "$s_dir/$t_rpath" ;;
33
                 path) echo "$s_dir/$t_rpath" ;;
34
-                jats) echo "$s_id$t_rpath"   ;;
34
+                id) echo "$s_id$t_rpath"   ;;
35
             esac
35
             esac
36
         done
36
         done
37
 }
37
 }
60
     esac done
60
     esac done
61
     FindDirs=("$@")
61
     FindDirs=("$@")
62
     case $Fmt in
62
     case $Fmt in
63
-        jats|path) : ;;
63
+        id|path) : ;;
64
         *) usage -w "unknown FMT: $Fmt" ;;
64
         *) usage -w "unknown FMT: $Fmt" ;;
65
     esac
65
     esac
66
     debug -v FindDirs Fmt
66
     debug -v FindDirs Fmt