• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • TCL/EXPECT自動化測試腳本實例五 --- 由文件中讀取一行

    發表于:2009-06-24來源:作者:點擊數: 標簽:自動化腳本TCLEXPECT實例
    這個函數由文件中讀取一行,跳過空行和注釋行。 代碼見下,比較簡單,就不再分析了。調用實例見前面的文章。 #************************************************ # get a line from file, skip blank lines and # comment lines, return the reading line i

    這個函數由文件中讀取一行,跳過空行和注釋行。

    代碼見下,比較簡單,就不再分析了。調用實例見前面的文章。

    #************************************************
    # get a line from file, skip blank lines and
    # comment lines, return the reading line in
    # parameter 'line'.
    #
    # @PARAMS
    # fd     - file fd
    # line   - var used to return the line
    #
    # @RETURN
    # return 1 if read suclearcase/" target="_blank" >ccessfully, otherwise 0
    #************************************************
    proc getLine {fd line} {
        upvar $line ln

        # read a line from fd
        while {[set lineLen [gets $fd ln]] >= 0} {
            # blank line
            if { $lineLen == 0 } continue
     
            # trim whitespace
            set ln [string trim $ln]
            if { [string length $ln] == 0 } continue

            # skip comment
            if { [string index $ln 0] == "#" } continue

            # success
            return 1
        }

        return 0

    原文轉自:http://www.kjueaiud.com

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>