cat > applname <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'
share_data_test01
+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 644 applname
cat > script <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'
!TEST echo comments on
!TEST : share form and window
!F1
!TEST printscreen
!REDRAW
!TEST : share form
!F2
!TEST printscreen
!REDRAW
!TEST : share window
!F3
!TEST printscreen
!DELETE
y
+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 644 script
cat > stdout <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'
: share form and window
                  -------------------------------                               
                  |S H A R E   D A T A   T E S T|  Test: share form and window  
                  -------------------------------                               
 -----------------------------------------------------------------------        
 |           Form                    |             Window              |        
 |Form name: share_data_form_l01     |Window name: share_data_lwin01   |        
 |Stored in: share_data_lib01        |Stored in  : share_data_lib01    |        
 |-----------------------------------+---------------------------------|        
 |         Key contexts              |             Fields              |        
 |1. context name:                   |1. field :                       |        
 |   stored in   :                   |   name  :                       |        
 |2. context name:                   |   stored:                       |        
 |   stored in   :                   |2. field :                       |        
 |3. context name:                   |   name  :                       |        
 |   stored in   :                   |   stored:                       |        
 |4. context name:                   |3. field :                       |        
 |   stored in   :                   |   name  :                       |        
 |5. context name:                   |   stored:                       |        
 |   stored in   :                   |                                 |        
 |6. Glb context1:                   |                                 |        
 |   stored in   :                   |---------------------------------|        
 |7. Glb context2:                   | Note: no key context and field  |        
 |   stored in   :                   |       for this test.            |        
 -----------------------------------------------------------------------        
Cursor positioned at (R1, C1)
: share form
                  -------------------------------                               
                  |S H A R E   D A T A   T E S T|  Test: share form only.       
                  -------------------------------                               
 -----------------------------------------------------------------------        
 |           Form                    |             Window              |        
 |Form name: share_data_form_l02     |Window name: share_data_win02    |        
 |Stored in: share_data_lib01        |Stored in  : share_data_testxx   |        
 |-----------------------------------+---------------------------------|        
 |         Key contexts              |             Fields              |        
 |1. context name:                   |1. field :                       |        
 |   stored in   :                   |   name  :                       |        
 |2. context name:                   |   stored:                       |        
 |   stored in   :                   |2. field :                       |        
 |3. context name:                   |   name  :                       |        
 |   stored in   :                   |   stored:                       |        
 |4. context name:                   |3. field :                       |        
 |   stored in   :                   |   name  :                       |        
 |5. context name:                   |   stored:                       |        
 |   stored in   :                   |                                 |        
 |6. Glb context1:                   |                                 |        
 |   stored in   :                   |---------------------------------|        
 |7. Glb context2:                   | Note: no key context and field  |        
 |   stored in   :                   |       for this test.            |        
 -----------------------------------------------------------------------        
Cursor positioned at (R1, C1)
: share window
                  -------------------------------                               
                  |S H A R E   D A T A   T E S T|  Test: share window only;     
                  -------------------------------        form in appl.          
 -----------------------------------------------------------------------        
 |           Form                    |             Window              |        
 |Form name: share_data_form_03      |Window name: share_data_lwin03   |        
 |Stored in: share_data_testxx       |Stored in  : share_data_lib01    |        
 |-----------------------------------+---------------------------------|        
 |         Key contexts              |             Fields              |        
 |1. context name:                   |1. field :                       |        
 |   stored in   :                   |   name  :                       |        
 |2. context name:                   |   stored:                       |        
 |   stored in   :                   |2. field :                       |        
 |3. context name:                   |   name  :                       |        
 |   stored in   :                   |   stored:                       |        
 |4. context name:                   |3. field :                       |        
 |   stored in   :                   |   name  :                       |        
 |5. context name:                   |   stored:                       |        
 |   stored in   :                   |                                 |        
 |6. Glb context1:                   |                                 |        
 |   stored in   :                   |---------------------------------|        
 |7. Glb context2:                   | Note: no key context and field  |        
 |   stored in   :                   |       for this test.            |        
 -----------------------------------------------------------------------        
Cursor positioned at (R1, C1)
+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 644 stdout
cat > tag <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'
This test contains 3 small tests.
1. Application gets its window and form from the library.
2. Application gets its form from the library while it has its own window.
3. Application gets its window from the library while it has its own form.

#3 is tricky. We need to compile the application and then compile and link
library and then compile and link the application again.
+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 644 tag
