|
1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | 2 | <!-- $Revision$ --> |
3 | | -<!-- EN-Revision: 73fae4ee51b644b72028e610abefefced57c18ad Maintainer: takagi Status: ready --> |
| 3 | +<!-- EN-Revision: 1ad8299bbc5c7d1b5dcf6883aaba0f7dbc4f116f Maintainer: takagi Status: ready --> |
4 | 4 | <!-- Credits: mumumu --> |
5 | | -<refentry xml:id="function.expect-expectl" xmlns="http://docbook.org/ns/docbook"> |
| 5 | +<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.expect-expectl"> |
6 | 6 | <refnamediv> |
7 | 7 | <refname>expect_expectl</refname> |
8 | 8 | <refpurpose>プロセスの出力がパターンに一致する・指定した時間が経過する・ |
|
33 | 33 | </refsect1> |
34 | 34 | <refsect1 role="parameters"> |
35 | 35 | &reftitle.parameters; |
36 | | - <para> |
37 | | - <variablelist> |
38 | | - <varlistentry> |
39 | | - <term><parameter>expect</parameter></term> |
40 | | - <listitem> |
41 | | - <para> |
42 | | - 事前に <function>expect_popen</function> でオープンした |
43 | | - Expect ストリーム。 |
44 | | - </para> |
45 | | - </listitem> |
46 | | - </varlistentry> |
47 | | - <varlistentry> |
48 | | - <term><parameter>cases</parameter></term> |
49 | | - <listitem> |
50 | | - <para> |
51 | | - expect case の配列。個々の expect case は数値添字の配列で、 |
52 | | - 以下のような形式となります。 |
53 | | - <table> |
54 | | - <title>Expect Case の配列</title> |
55 | | - <tgroup cols="5"> |
56 | | - <thead> |
57 | | - <row> |
58 | | - <entry>添字</entry> |
59 | | - <entry>値の型</entry> |
60 | | - <entry>説明</entry> |
61 | | - <entry>必須かどうか</entry> |
62 | | - <entry>デフォルト値</entry> |
63 | | - </row> |
64 | | - </thead> |
65 | | - <tbody> |
66 | | - <row> |
67 | | - <entry>0</entry> |
68 | | - <entry>string</entry> |
69 | | - <entry>ストリームからの出力との比較対象となるパターン。</entry> |
70 | | - <entry>yes</entry> |
71 | | - <entry></entry> |
72 | | - </row> |
73 | | - <row> |
74 | | - <entry>1</entry> |
75 | | - <entry>mixed</entry> |
76 | | - <entry>パターンに一致した場合にこの関数が返す値。</entry> |
77 | | - <entry>yes</entry> |
78 | | - <entry></entry> |
79 | | - </row> |
80 | | - <row> |
81 | | - <entry>2</entry> |
82 | | - <entry>integer</entry> |
83 | | - <entry> |
84 | | - パターンの形式。 |
85 | | - <link linkend="constant.exp-glob"><constant>EXP_GLOB</constant></link>、 |
86 | | - <link linkend="constant.exp-exact"><constant>EXP_EXACT</constant></link> |
87 | | - あるいは |
88 | | - <link linkend="constant.exp-regexp"><constant>EXP_REGEXP</constant></link> |
89 | | - のいずれかひとつです。 |
90 | | - </entry> |
91 | | - <entry>no</entry> |
92 | | - <entry><link linkend="constant.exp-glob"><constant>EXP_GLOB</constant></link></entry> |
93 | | - </row> |
94 | | - </tbody> |
95 | | - </tgroup> |
96 | | - </table> |
97 | | - </para> |
98 | | - </listitem> |
99 | | - </varlistentry> |
100 | | - </variablelist> |
101 | | - </para> |
| 36 | + <variablelist> |
| 37 | + <varlistentry> |
| 38 | + <term><parameter>expect</parameter></term> |
| 39 | + <listitem> |
| 40 | + <para> |
| 41 | + 事前に <function>expect_popen</function> でオープンした |
| 42 | + Expect ストリーム。 |
| 43 | + </para> |
| 44 | + </listitem> |
| 45 | + </varlistentry> |
| 46 | + <varlistentry> |
| 47 | + <term><parameter>cases</parameter></term> |
| 48 | + <listitem> |
| 49 | + <para> |
| 50 | + expect case の配列。個々の expect case は数値添字の配列で、 |
| 51 | + 以下のような形式となります。 |
| 52 | + <table> |
| 53 | + <title>Expect Case の配列</title> |
| 54 | + <tgroup cols="5"> |
| 55 | + <thead> |
| 56 | + <row> |
| 57 | + <entry>添字</entry> |
| 58 | + <entry>値の型</entry> |
| 59 | + <entry>説明</entry> |
| 60 | + <entry>必須かどうか</entry> |
| 61 | + <entry>デフォルト値</entry> |
| 62 | + </row> |
| 63 | + </thead> |
| 64 | + <tbody> |
| 65 | + <row> |
| 66 | + <entry>0</entry> |
| 67 | + <entry>string</entry> |
| 68 | + <entry>ストリームからの出力との比較対象となるパターン。</entry> |
| 69 | + <entry>yes</entry> |
| 70 | + <entry/> |
| 71 | + </row> |
| 72 | + <row> |
| 73 | + <entry>1</entry> |
| 74 | + <entry>mixed</entry> |
| 75 | + <entry>パターンに一致した場合にこの関数が返す値。</entry> |
| 76 | + <entry>yes</entry> |
| 77 | + <entry/> |
| 78 | + </row> |
| 79 | + <row> |
| 80 | + <entry>2</entry> |
| 81 | + <entry>integer</entry> |
| 82 | + <entry> |
| 83 | + パターンの形式。 |
| 84 | + <link linkend="constant.exp-glob"><constant>EXP_GLOB</constant></link>、 |
| 85 | + <link linkend="constant.exp-exact"><constant>EXP_EXACT</constant></link> |
| 86 | + あるいは |
| 87 | + <link linkend="constant.exp-regexp"><constant>EXP_REGEXP</constant></link> |
| 88 | + のいずれかひとつです。 |
| 89 | + </entry> |
| 90 | + <entry>no</entry> |
| 91 | + <entry><link linkend="constant.exp-glob"><constant>EXP_GLOB</constant></link></entry> |
| 92 | + </row> |
| 93 | + </tbody> |
| 94 | + </tgroup> |
| 95 | + </table> |
| 96 | + </para> |
| 97 | + </listitem> |
| 98 | + </varlistentry> |
| 99 | + </variablelist> |
102 | 100 | </refsect1> |
103 | 101 | <refsect1 role="returnvalues"> |
104 | 102 | &reftitle.returnvalues; |
|
116 | 114 | </refsect1> |
117 | 115 | <refsect1 role="changelog"> |
118 | 116 | &reftitle.changelog; |
119 | | - <para> |
120 | | - <informaltable> |
121 | | - <tgroup cols="2"> |
122 | | - <thead> |
123 | | - <row> |
124 | | - <entry>&Version;</entry> |
125 | | - <entry>&Description;</entry> |
126 | | - </row> |
127 | | - </thead> |
128 | | - <tbody> |
129 | | - <row> |
130 | | - <entry>PECL expect 0.2.1</entry> |
131 | | - <entry> |
132 | | - バージョン 0.2.1 より前では、<parameter>match</parameter> |
133 | | - パラメータに返されるのはマッチした文字列であり、 |
134 | | - 部分文字列の配列ではありませんでした。 |
135 | | - </entry> |
136 | | - </row> |
137 | | - </tbody> |
138 | | - </tgroup> |
139 | | - </informaltable> |
140 | | - </para> |
| 117 | + <informaltable> |
| 118 | + <tgroup cols="2"> |
| 119 | + <thead> |
| 120 | + <row> |
| 121 | + <entry>&Version;</entry> |
| 122 | + <entry>&Description;</entry> |
| 123 | + </row> |
| 124 | + </thead> |
| 125 | + <tbody> |
| 126 | + <row> |
| 127 | + <entry>PECL expect 0.2.1</entry> |
| 128 | + <entry> |
| 129 | + バージョン 0.2.1 より前では、<parameter>match</parameter> |
| 130 | + パラメータに返されるのはマッチした文字列であり、 |
| 131 | + 部分文字列の配列ではありませんでした。 |
| 132 | + </entry> |
| 133 | + </row> |
| 134 | + </tbody> |
| 135 | + </tgroup> |
| 136 | + </informaltable> |
141 | 137 | </refsect1> |
142 | 138 | <refsect1 role="examples"> |
143 | 139 | &reftitle.examples; |
144 | | - <para> |
145 | | - <example> |
146 | | - <title><function>expect_expectl</function> の例</title> |
147 | | - <programlisting role="php"> |
| 140 | + <example> |
| 141 | + <title><function>expect_expectl</function> の例</title> |
| 142 | + <programlisting role="php"> |
148 | 143 | <![CDATA[ |
149 | 144 | <?php |
150 | 145 | // ファイルをリモートホストにコピーします |
@@ -178,20 +173,16 @@ fclose($stream); |
178 | 173 | ?> |
179 | 174 | ?> |
180 | 175 | ]]> |
181 | | - </programlisting> |
182 | | - </example> |
183 | | - </para> |
| 176 | + </programlisting> |
| 177 | + </example> |
184 | 178 | </refsect1> |
185 | 179 | <refsect1 role="seealso"> |
186 | 180 | &reftitle.seealso; |
187 | | - <para> |
188 | | - <simplelist> |
189 | | - <member><function>expect_popen</function></member> |
190 | | - </simplelist> |
191 | | - </para> |
| 181 | + <simplelist> |
| 182 | + <member><function>expect_popen</function></member> |
| 183 | + </simplelist> |
192 | 184 | </refsect1> |
193 | 185 | </refentry> |
194 | | - |
195 | 186 | <!-- Keep this comment at the end of the file |
196 | 187 | Local variables: |
197 | 188 | mode: sgml |
|
0 commit comments