source: git/Tst/Manual/ASCII_links.tst @ 894057

spielwiese
Last change on this file since 894057 was 894057, checked in by Oleksandr Motsak <motsak@…>, 13 years ago
ADD: Tests from online manual (res+stat on mamawutz): short ones Tst/Manual/s.lst
  • Property mode set to 100644
File size: 637 bytes
Line 
1LIB "tst.lib"; tst_init();
2  ring r=32003,(x,y,z),dp;
3  link l=":w example.txt";     // type is ASCII, mode is overwrite
4  l;
5  status(l, "open", "yes");    // link is not yet opened
6  ideal i=x2,y2,z2;
7  write (l,1,";",2,";","ideal i=",i,";");
8  status(l, "open", "yes");    // now link is open
9  status(l, "mode");           // for writing
10  close(l);                    // link is closed
11  write("example.txt","int j=5;");// data is appended to file
12  read("example.txt");         // data is returned as string
13  execute(read(l));            // read string is executed
14  close(l);                    // link is closed
15tst_status(1);$
Note: See TracBrowser for help on using the repository browser.